diff --git a/mcxr-core/src/main/java/net/sorenon/mcxr/core/MCXRCore.java b/mcxr-core/src/main/java/net/sorenon/mcxr/core/MCXRCore.java index f7cef873..6d954eac 100644 --- a/mcxr-core/src/main/java/net/sorenon/mcxr/core/MCXRCore.java +++ b/mcxr-core/src/main/java/net/sorenon/mcxr/core/MCXRCore.java @@ -8,10 +8,8 @@ import net.fabricmc.fabric.api.networking.v1.ServerLoginNetworking; import net.fabricmc.fabric.api.networking.v1.ServerPlayNetworking; import net.fabricmc.loader.api.FabricLoader; -import net.minecraft.client.player.LocalPlayer; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.resources.ResourceLocation; -import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.InteractionHand; import net.minecraft.world.entity.HumanoidArm; import net.minecraft.world.entity.LivingEntity; @@ -22,7 +20,6 @@ import net.sorenon.mcxr.core.mixin.ServerLoginNetworkHandlerAcc; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.joml.Quaternionf; import org.joml.Vector3f; public class MCXRCore implements ModInitializer { @@ -85,45 +82,55 @@ public void onInitialize() { pose1.read(buf); pose2.read(buf); pose3.read(buf); - server.execute(() -> { - setPlayerPoses(player, pose1, pose2, pose3, 0); - for(ServerPlayer player2 : server.getPlayerList().getPlayers()) { - if(player2 != player) { - FriendlyByteBuf buf2 = PacketByteBufs.create(); - buf2.writeUUID(player.getUUID()); - pose1.write(buf2); - pose2.write(buf2); - pose3.write(buf2); - ServerPlayNetworking.send(player2, POSES, buf2); - } - } - }); + var height = buf.readFloat(); + server.execute(() -> setPlayerPoses(player, pose1, pose2, pose3, height, 0)); }); ServerPlayNetworking.registerGlobalReceiver(TELEPORT, (server, player, handler, buf, responseSender) -> { - double x = buf.readDouble(); - double y = buf.readDouble(); - double z = buf.readDouble(); - server.execute(() -> player.setPos(x, y, z)); + server.execute(() -> { + PlayerExt acc = (PlayerExt) player; + Pose pose; + + if (player.getMainArm() == HumanoidArm.LEFT) { + pose = acc.getRightHandPose(); + } else { + pose = acc.getLeftHandPose(); + } + + Vector3f dir = pose.getOrientation().transform(new Vector3f(0, -1, 0)); + + var pos = Teleport.tp(player, JOMLUtil.convert(pose.getPos()), JOMLUtil.convert(dir)); + if (pos != null) { + player.setPos(pos); + } else { + LOGGER.warn("Player {} attempted an invalid teleport", player.toString()); + } + }); }); } - public void setPlayerPoses(Player player, Pose headPose, Pose leftHandPose, Pose rightHandPose, float f) { + public void setPlayerPoses(Player player, + Pose headPose, + Pose leftHandPose, + Pose rightHandPose, + float height, + float stoopid) { PlayerExt acc = (PlayerExt) player; - acc.getHeadPose().set(headPose); acc.getLeftHandPose().set(leftHandPose); acc.getRightHandPose().set(rightHandPose); + acc.setHeight(height); - if (f != 0) { - acc.getLeftHandPose().orientation.rotateX(f); - acc.getRightHandPose().orientation.rotateX(f); + if (stoopid != 0) { + acc.getLeftHandPose().orientation.rotateX(stoopid); + acc.getRightHandPose().orientation.rotateX(stoopid); FriendlyByteBuf buf = PacketByteBufs.create(); acc.getHeadPose().write(buf); acc.getLeftHandPose().write(buf); acc.getRightHandPose().write(buf); + buf.writeFloat(height); ClientPlayNetworking.send(POSES, buf); } diff --git a/mcxr-core/src/main/java/net/sorenon/mcxr/core/Teleport.java b/mcxr-core/src/main/java/net/sorenon/mcxr/core/Teleport.java index 25f30d56..45ac0e1f 100644 --- a/mcxr-core/src/main/java/net/sorenon/mcxr/core/Teleport.java +++ b/mcxr-core/src/main/java/net/sorenon/mcxr/core/Teleport.java @@ -14,7 +14,7 @@ public class Teleport { - public static Pair tpStage1(Player player, Vec3 start, Vec3 direction) { + public static Pair fireRayFromHand(Player player, Vec3 start, Vec3 direction) { var level = player.level; var hitResult = level.clip(new ClipContext(start, start.add(direction.scale(7)), ClipContext.Block.COLLIDER, ClipContext.Fluid.NONE, player)); @@ -42,7 +42,7 @@ public static Pair tpStage1(Player player, Vec3 start, Vec3 directio return new Pair<>(hitPos, null); } - public static Pair tpStage2(Player player, Vec3 hitPos1) { + public static Pair fireFallRay(Player player, Vec3 hitPos1) { var level = player.level; var hitResult = level.clip(new ClipContext(hitPos1, hitPos1.subtract(0, 5, 0), ClipContext.Block.COLLIDER, ClipContext.Fluid.NONE, player)); @@ -63,7 +63,7 @@ public static Pair tpStage2(Player player, Vec3 hitPos1) { @Nullable public static Vec3 tp(Player player, Vec3 start, Vec3 direction) { - var stage1 = tpStage1(player, start, direction); + var stage1 = fireRayFromHand(player, start, direction); var hitPos1 = stage1.getA(); var finalPos1 = stage1.getB(); @@ -73,7 +73,7 @@ public static Vec3 tp(Player player, Vec3 start, Vec3 direction) { hitPos1 = hitPos1.subtract(direction.scale(0.05)); - var stage2 = tpStage2(player, hitPos1); + var stage2 = fireFallRay(player, hitPos1); var hitPos2 = stage2.getA(); if (stage2.getB()) { diff --git a/mcxr-core/src/main/java/net/sorenon/mcxr/core/accessor/PlayerExt.java b/mcxr-core/src/main/java/net/sorenon/mcxr/core/accessor/PlayerExt.java index 39fc4996..d4496204 100644 --- a/mcxr-core/src/main/java/net/sorenon/mcxr/core/accessor/PlayerExt.java +++ b/mcxr-core/src/main/java/net/sorenon/mcxr/core/accessor/PlayerExt.java @@ -24,4 +24,6 @@ default Pose getPoseForArm(HumanoidArm arm) { boolean isXR(); ThreadLocal getOverrideTransform(); + + void setHeight(float height); } diff --git a/mcxr-core/src/main/java/net/sorenon/mcxr/core/mixin/PlayerEntityMixin.java b/mcxr-core/src/main/java/net/sorenon/mcxr/core/mixin/PlayerEntityMixin.java index e24fdba1..bcb84a17 100644 --- a/mcxr-core/src/main/java/net/sorenon/mcxr/core/mixin/PlayerEntityMixin.java +++ b/mcxr-core/src/main/java/net/sorenon/mcxr/core/mixin/PlayerEntityMixin.java @@ -43,6 +43,9 @@ public abstract class PlayerEntityMixin extends LivingEntity implements PlayerEx @Unique public Pose rightHandPose = new Pose(); + @Unique + public float height = 0; + @Unique public ThreadLocal overrideTransform = ThreadLocal.withInitial(() -> null); @@ -79,6 +82,7 @@ void overrideDims(net.minecraft.world.entity.Pose pose, CallbackInfoReturnable getOverrideTransform() { return this.overrideTransform; }; + + @Override + public void setHeight(float height) { + this.height = height; + } } diff --git a/mcxr-play/src/main/java/net/sorenon/mcxr/play/MCXRPlayClient.java b/mcxr-play/src/main/java/net/sorenon/mcxr/play/MCXRPlayClient.java index 5a8d6069..e182f586 100644 --- a/mcxr-play/src/main/java/net/sorenon/mcxr/play/MCXRPlayClient.java +++ b/mcxr-play/src/main/java/net/sorenon/mcxr/play/MCXRPlayClient.java @@ -93,6 +93,7 @@ public static int getMainHand() { @Override public void onInitializeClient() { + Configuration.OPENXR_EXPLICIT_INIT.set(true); PlayOptions.init(); PlayOptions.load(); PlayOptions.save(); diff --git a/mcxr-play/src/main/java/net/sorenon/mcxr/play/gui/QuickChat.java b/mcxr-play/src/main/java/net/sorenon/mcxr/play/gui/QuickChat.java index b9bdc874..b86a39ff 100644 --- a/mcxr-play/src/main/java/net/sorenon/mcxr/play/gui/QuickChat.java +++ b/mcxr-play/src/main/java/net/sorenon/mcxr/play/gui/QuickChat.java @@ -15,7 +15,7 @@ public class QuickChat extends ChatScreen { - private final static Logger LOGGER = LogManager.getLogger("questcraft"); + private final static Logger LOGGER = LogManager.getLogger("mcxr-play"); public QuickChat(String string) { super(string); @@ -46,8 +46,9 @@ protected void init() { "Hello","How are you?", "I'm alright.", "Go to sleep please!", "I Have Phantoms!", "Ready to play?", "Ready when you are!", - "Questcraft", "Are you on Quest 1 or 2?", - "Quest 1", "Quest 2", "I'm Lagging!", + "MCXR", "What VR headset are you using?", + "Oculus Quest", "Index", "Vive", "Oculus Rift", + "I'm Lagging!", "Wait for me!", "Have fun!", "Where are you?", "AFK", "BRB", "I'm Back", "/home", "/sethome", "/spawn", "/gamemode creative", "/gamemode survival" @@ -58,8 +59,9 @@ protected void init() { "Hello","How are you?", "I'm alright.", "Go to sleep please!", "I Have Phantoms!", "Ready to play?", "Ready when you are!", - "Questcraft", "Are you on Quest 1 or 2?", - "Quest 1", "Quest 2", "I'm Lagging!", + "MCXR", "What VR headset are you using?", + "Oculus Quest", "Index", "Vive", "Oculus Rift", + "I'm Lagging!", "Wait for me!", "Have fun!", "Where are you?", "AFK", "BRB", "I'm Back", "/home", "/sethome", "/spawn", "/gamemode creative", "/gamemode survival" diff --git a/mcxr-play/src/main/java/net/sorenon/mcxr/play/input/XrInput.java b/mcxr-play/src/main/java/net/sorenon/mcxr/play/input/XrInput.java index 7115c5f5..992a9c0b 100644 --- a/mcxr-play/src/main/java/net/sorenon/mcxr/play/input/XrInput.java +++ b/mcxr-play/src/main/java/net/sorenon/mcxr/play/input/XrInput.java @@ -2,19 +2,15 @@ import com.mojang.blaze3d.platform.InputConstants; -import net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking; -import net.fabricmc.fabric.api.networking.v1.PacketByteBufs; import net.minecraft.client.KeyMapping; import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.screens.ChatScreen; import net.minecraft.client.gui.screens.inventory.InventoryScreen; import net.minecraft.network.chat.Component; import net.minecraft.world.entity.HumanoidArm; import net.minecraft.world.entity.player.Player; +import net.minecraft.network.chat.Component; import net.sorenon.mcxr.core.JOMLUtil; -import net.sorenon.mcxr.core.MCXRCore; import net.sorenon.mcxr.core.Pose; -import net.sorenon.mcxr.core.Teleport; import net.sorenon.mcxr.play.MCXRGuiManager; import net.sorenon.mcxr.play.MCXRPlayClient; import net.sorenon.mcxr.play.PlayOptions; @@ -54,6 +50,8 @@ public final class XrInput { private static long lastPollTime = 0; + public static boolean teleport = false; + private XrInput() { } @@ -149,28 +147,7 @@ public static void pollActions() { } if (actionSet.teleport.changedSinceLastSync && !actionSet.teleport.currentState) { - Player player = Minecraft.getInstance().player; - if (player != null) { - int handIndex = 0; - if (player.getMainArm() == HumanoidArm.LEFT) { - handIndex = 1; - } - - Pose pose = XrInput.handsActionSet.gripPoses[handIndex].getMinecraftPose(); - - Vector3f dir = pose.getOrientation().rotateX((float) java.lang.Math.toRadians(PlayOptions.handPitchAdjust), new Quaternionf()).transform(new Vector3f(0, -1, 0)); - - var pos = Teleport.tp(player, JOMLUtil.convert(pose.getPos()), JOMLUtil.convert(dir)); - - if (pos != null) { - var buf = PacketByteBufs.create(); - buf.writeDouble(pos.x); - buf.writeDouble(pos.y); - buf.writeDouble(pos.z); - ClientPlayNetworking.send(MCXRCore.TELEPORT, buf); - player.setPos(pos); - } - } + XrInput.teleport = true; } if (PlayOptions.smoothTurning) { @@ -223,6 +200,7 @@ public static void pollActions() { } } } + if (actionSet.hotbarRight.currentState && actionSet.hotbarRight.changedSinceLastSync) { if (Minecraft.getInstance().player != null) { int selected = Minecraft.getInstance().player.getInventory().selected; diff --git a/mcxr-play/src/main/java/net/sorenon/mcxr/play/mixin/TutorialToastMixin.java b/mcxr-play/src/main/java/net/sorenon/mcxr/play/mixin/TutorialToastMixin.java index 44bb3fc6..23de6e9c 100644 --- a/mcxr-play/src/main/java/net/sorenon/mcxr/play/mixin/TutorialToastMixin.java +++ b/mcxr-play/src/main/java/net/sorenon/mcxr/play/mixin/TutorialToastMixin.java @@ -3,6 +3,7 @@ import net.minecraft.client.gui.components.toasts.Toast; import net.minecraft.client.gui.components.toasts.ToastComponent; import net.minecraft.client.gui.components.toasts.TutorialToast; +import net.sorenon.mcxr.play.MCXRPlayClient; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.injection.At; @@ -10,7 +11,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; // TutorialTost Mixin: -// Simply removes the tutorial toasts. They are very annoying in QuestCraft and are persistat. +// Simply removes the tutorial toasts. They are very annoying in VR and are persistent. @Mixin(TutorialToast.class) public class TutorialToastMixin { @@ -18,8 +19,9 @@ public class TutorialToastMixin { @Inject(at=@At("TAIL"), method = "render", cancellable = true) public void renderMixin(PoseStack poseStack, ToastComponent toastComponent, long l, CallbackInfoReturnable cir) { - cir.cancel(); - this.visibility = Toast.Visibility.HIDE; + if (MCXRPlayClient.MCXR_GAME_RENDERER.isXrMode()) { + cir.cancel(); + this.visibility = Toast.Visibility.HIDE; + } } - } diff --git a/mcxr-play/src/main/java/net/sorenon/mcxr/play/openxr/MCXRGameRenderer.java b/mcxr-play/src/main/java/net/sorenon/mcxr/play/openxr/MCXRGameRenderer.java index eaa66969..c0f7ef91 100644 --- a/mcxr-play/src/main/java/net/sorenon/mcxr/play/openxr/MCXRGameRenderer.java +++ b/mcxr-play/src/main/java/net/sorenon/mcxr/play/openxr/MCXRGameRenderer.java @@ -15,20 +15,28 @@ import net.minecraft.network.FriendlyByteBuf; import net.minecraft.util.Mth; import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.HumanoidArm; import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.player.Player; +import net.sorenon.mcxr.core.JOMLUtil; import net.sorenon.mcxr.core.MCXRCore; +import net.sorenon.mcxr.core.Pose; +import net.sorenon.mcxr.core.Teleport; import net.sorenon.mcxr.core.accessor.PlayerExt; import net.sorenon.mcxr.core.mixin.LivingEntityAcc; import net.sorenon.mcxr.play.MCXRGuiManager; import net.sorenon.mcxr.play.MCXRPlayClient; import net.sorenon.mcxr.play.PlayOptions; import net.sorenon.mcxr.play.accessor.MinecraftExt; +import net.sorenon.mcxr.play.input.actionsets.VanillaGameplayActionSet; import net.sorenon.mcxr.play.rendering.MCXRCamera; import net.sorenon.mcxr.play.rendering.MCXRMainTarget; import net.sorenon.mcxr.play.rendering.RenderPass; import net.sorenon.mcxr.play.rendering.XrRenderTarget; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.joml.Quaternionf; +import org.joml.Vector3f; import org.lwjgl.PointerBuffer; import org.lwjgl.glfw.GLFW; import net.sorenon.mcxr.play.input.XrInput; @@ -175,7 +183,8 @@ private Struct renderXrGame(long predictedDisplayTime, MemoryStack stack) { //Update the server-side player poses if (Minecraft.getInstance().player != null && MCXRCore.getCoreConfig().supportsMCXR()) { - PlayerExt acc = (PlayerExt) Minecraft.getInstance().player; + Player player = Minecraft.getInstance().player; + PlayerExt acc = (PlayerExt) player; if (!acc.isXR()) { FriendlyByteBuf buf = PacketByteBufs.create(); buf.writeBoolean(true); @@ -187,8 +196,29 @@ private Struct renderXrGame(long predictedDisplayTime, MemoryStack stack) { MCXRPlayClient.viewSpacePoses.getMinecraftPose(), XrInput.handsActionSet.gripPoses[0].getMinecraftPose(), XrInput.handsActionSet.gripPoses[1].getMinecraftPose(), + MCXRPlayClient.viewSpacePoses.getPhysicalPose().getPos().y, (float) Math.toRadians(PlayOptions.handPitchAdjust) ); + + if (XrInput.teleport) { + XrInput.teleport = false; + int handIndex = 0; + if (player.getMainArm() == HumanoidArm.LEFT) { + handIndex = 1; + } + + Pose pose = XrInput.handsActionSet.gripPoses[handIndex].getMinecraftPose(); + + Vector3f dir = pose.getOrientation().rotateX((float) java.lang.Math.toRadians(PlayOptions.handPitchAdjust), new Quaternionf()).transform(new Vector3f(0, -1, 0)); + + var pos = Teleport.tp(player, JOMLUtil.convert(pose.getPos()), JOMLUtil.convert(dir)); + if (pos != null) { + ClientPlayNetworking.send(MCXRCore.TELEPORT, PacketByteBufs.empty()); + player.setPos(pos); + } + } + } else { + XrInput.teleport = false; } }); diff --git a/mcxr-play/src/main/java/net/sorenon/mcxr/play/rendering/VrFirstPersonRenderer.java b/mcxr-play/src/main/java/net/sorenon/mcxr/play/rendering/VrFirstPersonRenderer.java index 72fe889d..c514d41e 100644 --- a/mcxr-play/src/main/java/net/sorenon/mcxr/play/rendering/VrFirstPersonRenderer.java +++ b/mcxr-play/src/main/java/net/sorenon/mcxr/play/rendering/VrFirstPersonRenderer.java @@ -24,8 +24,6 @@ import net.minecraft.client.renderer.*; import net.minecraft.client.renderer.block.model.ItemTransforms; import net.minecraft.client.renderer.texture.OverlayTexture; -import net.minecraft.core.BlockPos; -import net.minecraft.core.Direction; import net.minecraft.resources.ResourceLocation; import net.minecraft.util.Mth; import net.minecraft.world.entity.Entity; @@ -33,16 +31,11 @@ import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; -import net.minecraft.world.level.ClipContext; import net.minecraft.world.level.Level; import net.minecraft.world.level.LightLayer; -import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.HitResult; import net.minecraft.world.phys.Vec3; -import net.minecraft.world.phys.shapes.CollisionContext; -import net.minecraft.world.phys.shapes.Shapes; -import net.minecraft.world.phys.shapes.VoxelShape; import net.sorenon.fart.FartUtil; import net.sorenon.fart.RenderStateShards; import net.sorenon.fart.RenderTypeBuilder; @@ -55,13 +48,12 @@ import net.sorenon.mcxr.play.PlayOptions; import net.sorenon.mcxr.play.input.XrInput; import net.sorenon.mcxr.play.openxr.MCXRGameRenderer; +import net.tr7zw.MapRenderer; import org.joml.Math; import org.joml.Quaternionf; import org.joml.Vector3f; import org.lwjgl.opengl.GL11; -import net.tr7zw.MapRenderer; - import java.util.function.Function; import java.util.function.Supplier; @@ -214,6 +206,82 @@ public void renderLast(WorldRenderContext context) { Vec3 gripPos = convert(pose.getPos()); Vec3 camPos = context.camera().getPosition(); + if (handIndex != MCXRPlayClient.getMainHand() && XrInput.vanillaGameplayActionSet.teleport.currentState) { + matrices.pushPose(); + + matrices.translate(-camPos.x, -camPos.y, -camPos.z); + + Matrix4f model = matrices.last().pose(); + Matrix3f normal = matrices.last().normal(); + + //Draw teleport ray + float maxDistHor = 7; + float maxDistVer = 1.5f; + + Player player = Minecraft.getInstance().player; + + Vector3f dir = pose.getOrientation().rotateX((float) java.lang.Math.toRadians(PlayOptions.handPitchAdjust), new Quaternionf()).transform(new Vector3f(0, -1, 0)); + + var stage1 = Teleport.fireRayFromHand(player, JOMLUtil.convert(pose.getPos()), JOMLUtil.convert(dir)); + Vec3 hitPos1 = stage1.getA(); + Vec3 finalPos = stage1.getB(); + + boolean blocked; + if (finalPos != null) { + blocked = false; + if (hitPos1 == null) { + hitPos1 = finalPos; + } + } else { + hitPos1 = hitPos1.subtract(JOMLUtil.convert(dir).scale(0.05)); + var stage2 = Teleport.fireFallRay(player, hitPos1); + finalPos = stage2.getA(); + blocked = !stage2.getB(); + + VertexConsumer consumer = consumers.getBuffer(LINE_CUSTOM.apply(2.0)); + if (blocked) { + consumer.vertex(model, (float) hitPos1.x, (float) hitPos1.y, (float) hitPos1.z).color(0.7f, 0.1f, 0.1f, 1).normal(normal, 0, -1, 0).endVertex(); + consumer.vertex(model, (float) hitPos1.x, (float) finalPos.y, (float) hitPos1.z).color(0.7f, 0.1f, 0.1f, 1).normal(normal, 0, -1, 0).endVertex(); + } else { + consumer.vertex(model, (float) hitPos1.x, (float) hitPos1.y, (float) hitPos1.z).color(0.1f, 0.1f, 0.7f, 1).normal(normal, 0, -1, 0).endVertex(); + consumer.vertex(model, (float) hitPos1.x, (float) finalPos.y, (float) hitPos1.z).color(0.1f, 0.1f, 0.7f, 1).normal(normal, 0, -1, 0).endVertex(); + } + } + + matrices.pushPose(); + + if (gripPos.y > hitPos1.y) { + matrices.translate((float) gripPos.x, (float) gripPos.y, (float) gripPos.z); + for (int i = 0; i <= 16; ++i) { + stringVertex((float) hitPos1.x - (float) gripPos.x, (float) hitPos1.y - (float) gripPos.y, (float) hitPos1.z - (float) gripPos.z, consumers.getBuffer(LINE_CUSTOM_ALWAYS.apply(5.)), matrices.last(), i / 16f, (i + 1) / 16f, blocked); + } + } else { + matrices.translate((float) hitPos1.x, (float) hitPos1.y, (float) hitPos1.z); + for (int i = 0; i <= 16; ++i) { + stringVertex((float) gripPos.x - (float) hitPos1.x, (float) gripPos.y - (float) hitPos1.y, (float) gripPos.z - (float) hitPos1.z, consumers.getBuffer(LINE_CUSTOM_ALWAYS.apply(5.)), matrices.last(), i / 16f, (i + 1) / 16f, blocked); + } + } + + matrices.popPose(); + matrices.pushPose(); + matrices.translate(finalPos.x, finalPos.y, finalPos.z); + PoseStack.Pose entry = matrices.last(); + + VertexConsumer vertexConsumer = context.consumers().getBuffer(RenderType.entityTranslucent(new ResourceLocation("textures/misc/shadow.png"))); + + float alpha = 0.6f; + float radius = camEntity.getBbWidth() / 2; + float y0 = 0.005f; + + vertexConsumer.vertex(entry.pose(), -radius, y0, -radius).color(0.1F, 0.1F, 1.0F, alpha).uv(0, 0).overlayCoords(OverlayTexture.NO_OVERLAY).uv2(15728880).normal(entry.normal(), 0.0F, 1.0F, 0.0F).endVertex(); + vertexConsumer.vertex(entry.pose(), -radius, y0, radius).color(0.1F, 0.1F, 1.0F, alpha).uv(0, 1).overlayCoords(OverlayTexture.NO_OVERLAY).uv2(15728880).normal(entry.normal(), 0.0F, 1.0F, 0.0F).endVertex(); + vertexConsumer.vertex(entry.pose(), radius, y0, radius).color(0.1F, 0.1F, 1.0F, alpha).uv(1, 1).overlayCoords(OverlayTexture.NO_OVERLAY).uv2(15728880).normal(entry.normal(), 0.0F, 1.0F, 0.0F).endVertex(); + vertexConsumer.vertex(entry.pose(), radius, y0, -radius).color(0.1F, 0.1F, 1.0F, alpha).uv(1, 0).overlayCoords(OverlayTexture.NO_OVERLAY).uv2(15728880).normal(entry.normal(), 0.0F, 1.0F, 0.0F).endVertex(); + + matrices.popPose(); + matrices.popPose(); + } + matrices.translate(gripPos.x - camPos.x, gripPos.y - camPos.y, gripPos.z - camPos.z); float scale = MCXRPlayClient.getCameraScale(); @@ -301,24 +369,30 @@ private static void stringVertex(float x, float z, VertexConsumer buffer, PoseStack.Pose normal, - float f, - float g, + float startPercent, + float endPercent, boolean blocked) { - float h = x * f; - float i = y * (f * f + f) * 0.5F; - float j = z * f; - float k = x * g - h; - float l = y * (g * g + g) * 0.5F + i; - float m = z * g - j; - float n = Mth.sqrt(k * k + l * l + m * m); - k /= n; - l /= n; - m /= n; + float x1 = x * startPercent; + float y1 = y * (startPercent * startPercent + startPercent) * 0.5F; + float z1 = z * startPercent; + + float x2 = x * endPercent; + float y2 = y * (endPercent * endPercent + endPercent) * 0.5F; + float z2 = z * endPercent; + + float dx = x2 - x1; + float dy = y2 - y1; + float dz = z2 - z1; + float n1 = Mth.sqrt(dx * dx * dy * dy + dz * dz); + dx /= n1; + dy /= n1; + dz /= n1; if (blocked) { - buffer.vertex(normal.pose(), h, i, j).color(1, 0.3f, 0.3f, 1).normal(normal.normal(), k, l, m).endVertex(); + buffer.vertex(normal.pose(), x1, y1, z1).color(1, 0.3f, 0.3f, 1).normal(normal.normal(), dx, dy, dz).endVertex(); + buffer.vertex(normal.pose(), x2, y2, z2).color(1, 0.3f, 0.3f, 1).normal(normal.normal(), dx, dy, dz).endVertex(); } else { - buffer.vertex(normal.pose(), h, i, j).color(0.3f, 0.3f, 1, 1).normal(normal.normal(), k, l, m).endVertex(); - + buffer.vertex(normal.pose(), x1, y1, z1).color(0.3f, 0.3f, 1, 1).normal(normal.normal(), dx, dy, dz).endVertex(); + buffer.vertex(normal.pose(), x2, y2, z2).color(0.3f, 0.3f, 1, 1).normal(normal.normal(), dx, dy, dz).endVertex(); } } diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/DispatchableHandle.java b/mcxr-play/src/main/java/org/lwjgl/openxr/DispatchableHandle.java deleted file mode 100644 index 934c8064..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/DispatchableHandle.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.openxr; - -import org.lwjgl.system.Pointer; - -abstract class DispatchableHandle extends Pointer.Default { - - private final XRCapabilities capabilities; - - DispatchableHandle(long handle, XRCapabilities capabilities) { - super(handle); - this.capabilities = capabilities; - } - - /** Returns the {@link XRCapabilities} instance associated with this dispatchable handle. */ - public XRCapabilities getCapabilities() { - return capabilities; - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/EPICViewConfigurationFov.java b/mcxr-play/src/main/java/org/lwjgl/openxr/EPICViewConfigurationFov.java deleted file mode 100644 index ebb10d45..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/EPICViewConfigurationFov.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -/** The EPIC_view_configuration_fov extension. */ -public final class EPICViewConfigurationFov { - - /** The extension specification version. */ - public static final int XR_EPIC_view_configuration_fov_SPEC_VERSION = 2; - - /** The extension name. */ - public static final String XR_EPIC_VIEW_CONFIGURATION_FOV_EXTENSION_NAME = "XR_EPIC_view_configuration_fov"; - - /** Extends {@code XrStructureType}. */ - public static final int XR_TYPE_VIEW_CONFIGURATION_VIEW_FOV_EPIC = 1000059000; - - private EPICViewConfigurationFov() {} - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/EXTConformanceAutomation.java b/mcxr-play/src/main/java/org/lwjgl/openxr/EXTConformanceAutomation.java deleted file mode 100644 index 09bf89df..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/EXTConformanceAutomation.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.system.Library; -import org.lwjgl.system.NativeType; - -import static org.lwjgl.system.Checks.CHECKS; -import static org.lwjgl.system.Checks.check; - -/** The EXT_conformance_automation extension. */ -public class EXTConformanceAutomation { - - static { Library.initialize(); } - - /** The extension specification version. */ - public static final int XR_EXT_conformance_automation_SPEC_VERSION = 3; - - /** The extension name. */ - public static final String XR_EXT_CONFORMANCE_AUTOMATION_EXTENSION_NAME = "XR_EXT_conformance_automation"; - - protected EXTConformanceAutomation() { - throw new UnsupportedOperationException(); - } - - // --- [ xrSetInputDeviceActiveEXT ] --- - -// @NativeType("XrResult") -// public static int xrSetInputDeviceActiveEXT(XrSession session, @NativeType("XrPath") long interactionProfile, @NativeType("XrPath") long topLevelPath, @NativeType("XrBool32") boolean isActive) { -// long __functionAddress = session.getCapabilities().xrSetInputDeviceActiveEXT; -// if (CHECKS) { -// check(__functionAddress); -// } -// return callPJJI(session.address(), interactionProfile, topLevelPath, isActive ? 1 : 0, __functionAddress); -// } - - // --- [ xrSetInputDeviceStateBoolEXT ] --- - -// @NativeType("XrResult") -// public static int xrSetInputDeviceStateBoolEXT(XrSession session, @NativeType("XrPath") long topLevelPath, @NativeType("XrPath") long inputSourcePath, @NativeType("XrBool32") boolean state) { -// long __functionAddress = session.getCapabilities().xrSetInputDeviceStateBoolEXT; -// if (CHECKS) { -// check(__functionAddress); -// } -// return callPJJI(session.address(), topLevelPath, inputSourcePath, state ? 1 : 0, __functionAddress); -// } - - // --- [ xrSetInputDeviceStateFloatEXT ] --- - -// @NativeType("XrResult") -// public static int xrSetInputDeviceStateFloatEXT(XrSession session, @NativeType("XrPath") long topLevelPath, @NativeType("XrPath") long inputSourcePath, float state) { -// long __functionAddress = session.getCapabilities().xrSetInputDeviceStateFloatEXT; -// if (CHECKS) { -// check(__functionAddress); -// } -// return callPJJI(session.address(), topLevelPath, inputSourcePath, state, __functionAddress); -// } - - // --- [ xrSetInputDeviceStateVector2fEXT ] --- - - public static native int nxrSetInputDeviceStateVector2fEXT(long session, long topLevelPath, long inputSourcePath, long state, long __functionAddress); - - public static int nxrSetInputDeviceStateVector2fEXT(XrSession session, long topLevelPath, long inputSourcePath, long state) { - long __functionAddress = session.getCapabilities().xrSetInputDeviceStateVector2fEXT; - if (CHECKS) { - check(__functionAddress); - } - return nxrSetInputDeviceStateVector2fEXT(session.address(), topLevelPath, inputSourcePath, state, __functionAddress); - } - - @NativeType("XrResult") - public static int xrSetInputDeviceStateVector2fEXT(XrSession session, @NativeType("XrPath") long topLevelPath, @NativeType("XrPath") long inputSourcePath, XrVector2f state) { - return nxrSetInputDeviceStateVector2fEXT(session, topLevelPath, inputSourcePath, state.address()); - } - - // --- [ xrSetInputDeviceLocationEXT ] --- - - public static native int nxrSetInputDeviceLocationEXT(long session, long topLevelPath, long inputSourcePath, long space, long pose, long __functionAddress); - - public static int nxrSetInputDeviceLocationEXT(XrSession session, long topLevelPath, long inputSourcePath, XrSpace space, long pose) { - long __functionAddress = session.getCapabilities().xrSetInputDeviceLocationEXT; - if (CHECKS) { - check(__functionAddress); - } - return nxrSetInputDeviceLocationEXT(session.address(), topLevelPath, inputSourcePath, space.address(), pose, __functionAddress); - } - - @NativeType("XrResult") - public static int xrSetInputDeviceLocationEXT(XrSession session, @NativeType("XrPath") long topLevelPath, @NativeType("XrPath") long inputSourcePath, XrSpace space, XrPosef pose) { - return nxrSetInputDeviceLocationEXT(session, topLevelPath, inputSourcePath, space, pose.address()); - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/EXTDebugUtils.java b/mcxr-play/src/main/java/org/lwjgl/openxr/EXTDebugUtils.java deleted file mode 100644 index ee824711..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/EXTDebugUtils.java +++ /dev/null @@ -1,191 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.PointerBuffer; -import org.lwjgl.system.NativeType; - -import static org.lwjgl.system.Checks.CHECKS; -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.memAddress; - -/** The EXT_debug_utils extension. */ -public class EXTDebugUtils { - - /** The extension specification version. */ - public static final int XR_EXT_debug_utils_SPEC_VERSION = 4; - - /** The extension name. */ - public static final String XR_EXT_DEBUG_UTILS_EXTENSION_NAME = "XR_EXT_debug_utils"; - - /** - * Extends {@code XrStructureType}. - * - *
Enum values:
- * - *
    - *
  • {@link #XR_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT}
  • - *
  • {@link #XR_TYPE_DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXT TYPE_DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXT}
  • - *
  • {@link #XR_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT}
  • - *
  • {@link #XR_TYPE_DEBUG_UTILS_LABEL_EXT TYPE_DEBUG_UTILS_LABEL_EXT}
  • - *
- */ - public static final int - XR_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT = 1000019000, - XR_TYPE_DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXT = 1000019001, - XR_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT = 1000019002, - XR_TYPE_DEBUG_UTILS_LABEL_EXT = 1000019003; - - /** Extends {@code XrObjectType}. */ - public static final int XR_OBJECT_TYPE_DEBUG_UTILS_MESSENGER_EXT = 1000019000; - - /** - * XrDebugUtilsMessageSeverityFlagBitsEXT - * - *
Enum values:
- * - *
    - *
  • {@link #XR_DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT}
  • - *
  • {@link #XR_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT}
  • - *
  • {@link #XR_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT}
  • - *
  • {@link #XR_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT}
  • - *
- */ - public static final int - XR_DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT = 0x1, - XR_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT = 0x10, - XR_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT = 0x100, - XR_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT = 0x1000; - - /** - * XrDebugUtilsMessageTypeFlagBitsEXT - * - *
Enum values:
- * - *
    - *
  • {@link #XR_DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT}
  • - *
  • {@link #XR_DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT}
  • - *
  • {@link #XR_DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT}
  • - *
  • {@link #XR_DEBUG_UTILS_MESSAGE_TYPE_CONFORMANCE_BIT_EXT DEBUG_UTILS_MESSAGE_TYPE_CONFORMANCE_BIT_EXT}
  • - *
- */ - public static final int - XR_DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT = 0x1, - XR_DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT = 0x2, - XR_DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT = 0x4, - XR_DEBUG_UTILS_MESSAGE_TYPE_CONFORMANCE_BIT_EXT = 0x8; - - protected EXTDebugUtils() { - throw new UnsupportedOperationException(); - } - - // --- [ xrSetDebugUtilsObjectNameEXT ] --- - - public static int nxrSetDebugUtilsObjectNameEXT(XrInstance instance, long nameInfo) { - long __functionAddress = instance.getCapabilities().xrSetDebugUtilsObjectNameEXT; - if (CHECKS) { - check(__functionAddress); - } - return callPPI(instance.address(), nameInfo, __functionAddress); - } - - @NativeType("XrResult") - public static int xrSetDebugUtilsObjectNameEXT(XrInstance instance, @NativeType("XrDebugUtilsObjectNameInfoEXT const *") XrDebugUtilsObjectNameInfoEXT nameInfo) { - return nxrSetDebugUtilsObjectNameEXT(instance, nameInfo.address()); - } - - // --- [ xrCreateDebugUtilsMessengerEXT ] --- - - public static int nxrCreateDebugUtilsMessengerEXT(XrInstance instance, long createInfo, long messenger) { - long __functionAddress = instance.getCapabilities().xrCreateDebugUtilsMessengerEXT; - if (CHECKS) { - check(__functionAddress); - XrDebugUtilsMessengerCreateInfoEXT.validate(createInfo); - } - return callPPPI(instance.address(), createInfo, messenger, __functionAddress); - } - - @NativeType("XrResult") - public static int xrCreateDebugUtilsMessengerEXT(XrInstance instance, @NativeType("XrDebugUtilsMessengerCreateInfoEXT const *") XrDebugUtilsMessengerCreateInfoEXT createInfo, @NativeType("XrDebugUtilsMessengerEXT *") PointerBuffer messenger) { - if (CHECKS) { - check(messenger, 1); - } - return nxrCreateDebugUtilsMessengerEXT(instance, createInfo.address(), memAddress(messenger)); - } - - // --- [ xrDestroyDebugUtilsMessengerEXT ] --- - - @NativeType("XrResult") - public static int xrDestroyDebugUtilsMessengerEXT(XrDebugUtilsMessengerEXT messenger) { - long __functionAddress = messenger.getCapabilities().xrDestroyDebugUtilsMessengerEXT; - if (CHECKS) { - check(__functionAddress); - } - return callPI(messenger.address(), __functionAddress); - } - - // --- [ xrSubmitDebugUtilsMessageEXT ] --- - -// public static int nxrSubmitDebugUtilsMessageEXT(XrInstance instance, long messageSeverity, long messageTypes, long callbackData) { -// long __functionAddress = instance.getCapabilities().xrSubmitDebugUtilsMessageEXT; -// if (CHECKS) { -// check(__functionAddress); -// XrDebugUtilsMessengerCallbackDataEXT.validate(callbackData); -// } -// return callPJJPI(instance.address(), messageSeverity, messageTypes, callbackData, __functionAddress); -// } - -// @NativeType("XrResult") -// public static int xrSubmitDebugUtilsMessageEXT(XrInstance instance, @NativeType("XrDebugUtilsMessageSeverityFlagsEXT") long messageSeverity, @NativeType("XrDebugUtilsMessageTypeFlagsEXT") long messageTypes, @NativeType("XrDebugUtilsMessengerCallbackDataEXT const *") XrDebugUtilsMessengerCallbackDataEXT callbackData) { -// return nxrSubmitDebugUtilsMessageEXT(instance, messageSeverity, messageTypes, callbackData.address()); -// } - - // --- [ xrSessionBeginDebugUtilsLabelRegionEXT ] --- - - public static int nxrSessionBeginDebugUtilsLabelRegionEXT(XrSession session, long labelInfo) { - long __functionAddress = session.getCapabilities().xrSessionBeginDebugUtilsLabelRegionEXT; - if (CHECKS) { - check(__functionAddress); - XrDebugUtilsLabelEXT.validate(labelInfo); - } - return callPPI(session.address(), labelInfo, __functionAddress); - } - - @NativeType("XrResult") - public static int xrSessionBeginDebugUtilsLabelRegionEXT(XrSession session, @NativeType("XrDebugUtilsLabelEXT const *") XrDebugUtilsLabelEXT labelInfo) { - return nxrSessionBeginDebugUtilsLabelRegionEXT(session, labelInfo.address()); - } - - // --- [ xrSessionEndDebugUtilsLabelRegionEXT ] --- - - @NativeType("XrResult") - public static int xrSessionEndDebugUtilsLabelRegionEXT(XrSession session) { - long __functionAddress = session.getCapabilities().xrSessionEndDebugUtilsLabelRegionEXT; - if (CHECKS) { - check(__functionAddress); - } - return callPI(session.address(), __functionAddress); - } - - // --- [ xrSessionInsertDebugUtilsLabelEXT ] --- - - public static int nxrSessionInsertDebugUtilsLabelEXT(XrSession session, long labelInfo) { - long __functionAddress = session.getCapabilities().xrSessionInsertDebugUtilsLabelEXT; - if (CHECKS) { - check(__functionAddress); - XrDebugUtilsLabelEXT.validate(labelInfo); - } - return callPPI(session.address(), labelInfo, __functionAddress); - } - - @NativeType("XrResult") - public static int xrSessionInsertDebugUtilsLabelEXT(XrSession session, @NativeType("XrDebugUtilsLabelEXT const *") XrDebugUtilsLabelEXT labelInfo) { - return nxrSessionInsertDebugUtilsLabelEXT(session, labelInfo.address()); - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/EXTEyeGazeInteraction.java b/mcxr-play/src/main/java/org/lwjgl/openxr/EXTEyeGazeInteraction.java deleted file mode 100644 index e4ff0600..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/EXTEyeGazeInteraction.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -/** The EXT_eye_gaze_interaction extension. */ -public final class EXTEyeGazeInteraction { - - /** The extension specification version. */ - public static final int XR_EXT_eye_gaze_interaction_SPEC_VERSION = 1; - - /** The extension name. */ - public static final String XR_EXT_EYE_GAZE_INTERACTION_EXTENSION_NAME = "XR_EXT_eye_gaze_interaction"; - - /** - * Extends {@code XrStructureType}. - * - *
Enum values:
- * - *
    - *
  • {@link #XR_TYPE_SYSTEM_EYE_GAZE_INTERACTION_PROPERTIES_EXT TYPE_SYSTEM_EYE_GAZE_INTERACTION_PROPERTIES_EXT}
  • - *
  • {@link #XR_TYPE_EYE_GAZE_SAMPLE_TIME_EXT TYPE_EYE_GAZE_SAMPLE_TIME_EXT}
  • - *
- */ - public static final int - XR_TYPE_SYSTEM_EYE_GAZE_INTERACTION_PROPERTIES_EXT = 1000030000, - XR_TYPE_EYE_GAZE_SAMPLE_TIME_EXT = 1000030001; - - private EXTEyeGazeInteraction() {} - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/EXTHandJointsMotionRange.java b/mcxr-play/src/main/java/org/lwjgl/openxr/EXTHandJointsMotionRange.java deleted file mode 100644 index 28939b4c..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/EXTHandJointsMotionRange.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -/** The EXT_hand_joints_motion_range extension. */ -public final class EXTHandJointsMotionRange { - - /** The extension specification version. */ - public static final int XR_EXT_hand_joints_motion_range_SPEC_VERSION = 1; - - /** The extension name. */ - public static final String XR_EXT_HAND_JOINTS_MOTION_RANGE_EXTENSION_NAME = "XR_EXT_hand_joints_motion_range"; - - /** Extends {@code XrStructureType}. */ - public static final int XR_TYPE_HAND_JOINTS_MOTION_RANGE_INFO_EXT = 1000080000; - - /** - * XrHandJointsMotionRangeEXT - * - *
Enum values:
- * - *
    - *
  • {@link #XR_HAND_JOINTS_MOTION_RANGE_UNOBSTRUCTED_EXT HAND_JOINTS_MOTION_RANGE_UNOBSTRUCTED_EXT}
  • - *
  • {@link #XR_HAND_JOINTS_MOTION_RANGE_CONFORMING_TO_CONTROLLER_EXT HAND_JOINTS_MOTION_RANGE_CONFORMING_TO_CONTROLLER_EXT}
  • - *
- */ - public static final int - XR_HAND_JOINTS_MOTION_RANGE_UNOBSTRUCTED_EXT = 1, - XR_HAND_JOINTS_MOTION_RANGE_CONFORMING_TO_CONTROLLER_EXT = 2; - - private EXTHandJointsMotionRange() {} - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/EXTHandTracking.java b/mcxr-play/src/main/java/org/lwjgl/openxr/EXTHandTracking.java deleted file mode 100644 index f667953d..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/EXTHandTracking.java +++ /dev/null @@ -1,178 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.PointerBuffer; -import org.lwjgl.system.NativeType; - -import static org.lwjgl.system.Checks.CHECKS; -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.JNI.callPI; -import static org.lwjgl.system.JNI.callPPPI; -import static org.lwjgl.system.MemoryUtil.memAddress; - -/** The EXT_hand_tracking extension. */ -public class EXTHandTracking { - - /** The extension specification version. */ - public static final int XR_EXT_hand_tracking_SPEC_VERSION = 4; - - /** The extension name. */ - public static final String XR_EXT_HAND_TRACKING_EXTENSION_NAME = "XR_EXT_hand_tracking"; - - /** Extends {@code XrObjectType}. */ - public static final int XR_OBJECT_TYPE_HAND_TRACKER_EXT = 1000051000; - - /** - * Extends {@code XrStructureType}. - * - *
Enum values:
- * - *
    - *
  • {@link #XR_TYPE_SYSTEM_HAND_TRACKING_PROPERTIES_EXT TYPE_SYSTEM_HAND_TRACKING_PROPERTIES_EXT}
  • - *
  • {@link #XR_TYPE_HAND_TRACKER_CREATE_INFO_EXT TYPE_HAND_TRACKER_CREATE_INFO_EXT}
  • - *
  • {@link #XR_TYPE_HAND_JOINTS_LOCATE_INFO_EXT TYPE_HAND_JOINTS_LOCATE_INFO_EXT}
  • - *
  • {@link #XR_TYPE_HAND_JOINT_LOCATIONS_EXT TYPE_HAND_JOINT_LOCATIONS_EXT}
  • - *
  • {@link #XR_TYPE_HAND_JOINT_VELOCITIES_EXT TYPE_HAND_JOINT_VELOCITIES_EXT}
  • - *
- */ - public static final int - XR_TYPE_SYSTEM_HAND_TRACKING_PROPERTIES_EXT = 1000051000, - XR_TYPE_HAND_TRACKER_CREATE_INFO_EXT = 1000051001, - XR_TYPE_HAND_JOINTS_LOCATE_INFO_EXT = 1000051002, - XR_TYPE_HAND_JOINT_LOCATIONS_EXT = 1000051003, - XR_TYPE_HAND_JOINT_VELOCITIES_EXT = 1000051004; - - /** - * XrHandEXT - * - *
Enum values:
- * - *
    - *
  • {@link #XR_HAND_LEFT_EXT HAND_LEFT_EXT}
  • - *
  • {@link #XR_HAND_RIGHT_EXT HAND_RIGHT_EXT}
  • - *
- */ - public static final int - XR_HAND_LEFT_EXT = 1, - XR_HAND_RIGHT_EXT = 2; - - /** - * XrHandJointEXT - * - *
Enum values:
- * - *
    - *
  • {@link #XR_HAND_JOINT_PALM_EXT HAND_JOINT_PALM_EXT}
  • - *
  • {@link #XR_HAND_JOINT_WRIST_EXT HAND_JOINT_WRIST_EXT}
  • - *
  • {@link #XR_HAND_JOINT_THUMB_METACARPAL_EXT HAND_JOINT_THUMB_METACARPAL_EXT}
  • - *
  • {@link #XR_HAND_JOINT_THUMB_PROXIMAL_EXT HAND_JOINT_THUMB_PROXIMAL_EXT}
  • - *
  • {@link #XR_HAND_JOINT_THUMB_DISTAL_EXT HAND_JOINT_THUMB_DISTAL_EXT}
  • - *
  • {@link #XR_HAND_JOINT_THUMB_TIP_EXT HAND_JOINT_THUMB_TIP_EXT}
  • - *
  • {@link #XR_HAND_JOINT_INDEX_METACARPAL_EXT HAND_JOINT_INDEX_METACARPAL_EXT}
  • - *
  • {@link #XR_HAND_JOINT_INDEX_PROXIMAL_EXT HAND_JOINT_INDEX_PROXIMAL_EXT}
  • - *
  • {@link #XR_HAND_JOINT_INDEX_INTERMEDIATE_EXT HAND_JOINT_INDEX_INTERMEDIATE_EXT}
  • - *
  • {@link #XR_HAND_JOINT_INDEX_DISTAL_EXT HAND_JOINT_INDEX_DISTAL_EXT}
  • - *
  • {@link #XR_HAND_JOINT_INDEX_TIP_EXT HAND_JOINT_INDEX_TIP_EXT}
  • - *
  • {@link #XR_HAND_JOINT_MIDDLE_METACARPAL_EXT HAND_JOINT_MIDDLE_METACARPAL_EXT}
  • - *
  • {@link #XR_HAND_JOINT_MIDDLE_PROXIMAL_EXT HAND_JOINT_MIDDLE_PROXIMAL_EXT}
  • - *
  • {@link #XR_HAND_JOINT_MIDDLE_INTERMEDIATE_EXT HAND_JOINT_MIDDLE_INTERMEDIATE_EXT}
  • - *
  • {@link #XR_HAND_JOINT_MIDDLE_DISTAL_EXT HAND_JOINT_MIDDLE_DISTAL_EXT}
  • - *
  • {@link #XR_HAND_JOINT_MIDDLE_TIP_EXT HAND_JOINT_MIDDLE_TIP_EXT}
  • - *
  • {@link #XR_HAND_JOINT_RING_METACARPAL_EXT HAND_JOINT_RING_METACARPAL_EXT}
  • - *
  • {@link #XR_HAND_JOINT_RING_PROXIMAL_EXT HAND_JOINT_RING_PROXIMAL_EXT}
  • - *
  • {@link #XR_HAND_JOINT_RING_INTERMEDIATE_EXT HAND_JOINT_RING_INTERMEDIATE_EXT}
  • - *
  • {@link #XR_HAND_JOINT_RING_DISTAL_EXT HAND_JOINT_RING_DISTAL_EXT}
  • - *
  • {@link #XR_HAND_JOINT_RING_TIP_EXT HAND_JOINT_RING_TIP_EXT}
  • - *
  • {@link #XR_HAND_JOINT_LITTLE_METACARPAL_EXT HAND_JOINT_LITTLE_METACARPAL_EXT}
  • - *
  • {@link #XR_HAND_JOINT_LITTLE_PROXIMAL_EXT HAND_JOINT_LITTLE_PROXIMAL_EXT}
  • - *
  • {@link #XR_HAND_JOINT_LITTLE_INTERMEDIATE_EXT HAND_JOINT_LITTLE_INTERMEDIATE_EXT}
  • - *
  • {@link #XR_HAND_JOINT_LITTLE_DISTAL_EXT HAND_JOINT_LITTLE_DISTAL_EXT}
  • - *
  • {@link #XR_HAND_JOINT_LITTLE_TIP_EXT HAND_JOINT_LITTLE_TIP_EXT}
  • - *
- */ - public static final int - XR_HAND_JOINT_PALM_EXT = 0, - XR_HAND_JOINT_WRIST_EXT = 1, - XR_HAND_JOINT_THUMB_METACARPAL_EXT = 2, - XR_HAND_JOINT_THUMB_PROXIMAL_EXT = 3, - XR_HAND_JOINT_THUMB_DISTAL_EXT = 4, - XR_HAND_JOINT_THUMB_TIP_EXT = 5, - XR_HAND_JOINT_INDEX_METACARPAL_EXT = 6, - XR_HAND_JOINT_INDEX_PROXIMAL_EXT = 7, - XR_HAND_JOINT_INDEX_INTERMEDIATE_EXT = 8, - XR_HAND_JOINT_INDEX_DISTAL_EXT = 9, - XR_HAND_JOINT_INDEX_TIP_EXT = 10, - XR_HAND_JOINT_MIDDLE_METACARPAL_EXT = 11, - XR_HAND_JOINT_MIDDLE_PROXIMAL_EXT = 12, - XR_HAND_JOINT_MIDDLE_INTERMEDIATE_EXT = 13, - XR_HAND_JOINT_MIDDLE_DISTAL_EXT = 14, - XR_HAND_JOINT_MIDDLE_TIP_EXT = 15, - XR_HAND_JOINT_RING_METACARPAL_EXT = 16, - XR_HAND_JOINT_RING_PROXIMAL_EXT = 17, - XR_HAND_JOINT_RING_INTERMEDIATE_EXT = 18, - XR_HAND_JOINT_RING_DISTAL_EXT = 19, - XR_HAND_JOINT_RING_TIP_EXT = 20, - XR_HAND_JOINT_LITTLE_METACARPAL_EXT = 21, - XR_HAND_JOINT_LITTLE_PROXIMAL_EXT = 22, - XR_HAND_JOINT_LITTLE_INTERMEDIATE_EXT = 23, - XR_HAND_JOINT_LITTLE_DISTAL_EXT = 24, - XR_HAND_JOINT_LITTLE_TIP_EXT = 25; - - /** XrHandJointSetEXT */ - public static final int XR_HAND_JOINT_SET_DEFAULT_EXT = 0; - - protected EXTHandTracking() { - throw new UnsupportedOperationException(); - } - - // --- [ xrCreateHandTrackerEXT ] --- - - public static int nxrCreateHandTrackerEXT(XrSession session, long createInfo, long handTracker) { - long __functionAddress = session.getCapabilities().xrCreateHandTrackerEXT; - if (CHECKS) { - check(__functionAddress); - } - return callPPPI(session.address(), createInfo, handTracker, __functionAddress); - } - - @NativeType("XrResult") - public static int xrCreateHandTrackerEXT(XrSession session, @NativeType("XrHandTrackerCreateInfoEXT const *") XrHandTrackerCreateInfoEXT createInfo, @NativeType("XrHandTrackerEXT *") PointerBuffer handTracker) { - if (CHECKS) { - check(handTracker, 1); - } - return nxrCreateHandTrackerEXT(session, createInfo.address(), memAddress(handTracker)); - } - - // --- [ xrDestroyHandTrackerEXT ] --- - - @NativeType("XrResult") - public static int xrDestroyHandTrackerEXT(XrHandTrackerEXT handTracker) { - long __functionAddress = handTracker.getCapabilities().xrDestroyHandTrackerEXT; - if (CHECKS) { - check(__functionAddress); - } - return callPI(handTracker.address(), __functionAddress); - } - - // --- [ xrLocateHandJointsEXT ] --- - - public static int nxrLocateHandJointsEXT(XrHandTrackerEXT handTracker, long locateInfo, long locations) { - long __functionAddress = handTracker.getCapabilities().xrLocateHandJointsEXT; - if (CHECKS) { - check(__functionAddress); - XrHandJointsLocateInfoEXT.validate(locateInfo); - } - return callPPPI(handTracker.address(), locateInfo, locations, __functionAddress); - } - - @NativeType("XrResult") - public static int xrLocateHandJointsEXT(XrHandTrackerEXT handTracker, @NativeType("XrHandJointsLocateInfoEXT const *") XrHandJointsLocateInfoEXT locateInfo, @NativeType("XrHandJointLocationsEXT *") XrHandJointLocationsEXT locations) { - return nxrLocateHandJointsEXT(handTracker, locateInfo.address(), locations.address()); - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/EXTHpMixedRealityController.java b/mcxr-play/src/main/java/org/lwjgl/openxr/EXTHpMixedRealityController.java deleted file mode 100644 index 19517104..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/EXTHpMixedRealityController.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -/** The EXT_hp_mixed_reality_controller extension. */ -public final class EXTHpMixedRealityController { - - /** The extension specification version. */ - public static final int XR_EXT_hp_mixed_reality_controller_SPEC_VERSION = 1; - - /** The extension name. */ - public static final String XR_EXT_HP_MIXED_REALITY_CONTROLLER_EXTENSION_NAME = "XR_EXT_hp_mixed_reality_controller"; - - private EXTHpMixedRealityController() {} - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/EXTPerformanceSettings.java b/mcxr-play/src/main/java/org/lwjgl/openxr/EXTPerformanceSettings.java deleted file mode 100644 index 8a769259..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/EXTPerformanceSettings.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.system.NativeType; - -import static org.lwjgl.system.Checks.CHECKS; -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.JNI.callPI; - -/** The EXT_performance_settings extension. */ -public class EXTPerformanceSettings { - - /** The extension specification version. */ - public static final int XR_EXT_performance_settings_SPEC_VERSION = 3; - - /** The extension name. */ - public static final String XR_EXT_PERFORMANCE_SETTINGS_EXTENSION_NAME = "XR_EXT_performance_settings"; - - /** Extends {@code XrStructureType}. */ - public static final int XR_TYPE_EVENT_DATA_PERF_SETTINGS_EXT = 1000015000; - - /** - * XrPerfSettingsDomainEXT - * - *
Enum values:
- * - *
    - *
  • {@link #XR_PERF_SETTINGS_DOMAIN_CPU_EXT PERF_SETTINGS_DOMAIN_CPU_EXT}
  • - *
  • {@link #XR_PERF_SETTINGS_DOMAIN_GPU_EXT PERF_SETTINGS_DOMAIN_GPU_EXT}
  • - *
- */ - public static final int - XR_PERF_SETTINGS_DOMAIN_CPU_EXT = 1, - XR_PERF_SETTINGS_DOMAIN_GPU_EXT = 2; - - /** - * XrPerfSettingsSubDomainEXT - * - *
Enum values:
- * - *
    - *
  • {@link #XR_PERF_SETTINGS_SUB_DOMAIN_COMPOSITING_EXT PERF_SETTINGS_SUB_DOMAIN_COMPOSITING_EXT}
  • - *
  • {@link #XR_PERF_SETTINGS_SUB_DOMAIN_RENDERING_EXT PERF_SETTINGS_SUB_DOMAIN_RENDERING_EXT}
  • - *
  • {@link #XR_PERF_SETTINGS_SUB_DOMAIN_THERMAL_EXT PERF_SETTINGS_SUB_DOMAIN_THERMAL_EXT}
  • - *
- */ - public static final int - XR_PERF_SETTINGS_SUB_DOMAIN_COMPOSITING_EXT = 1, - XR_PERF_SETTINGS_SUB_DOMAIN_RENDERING_EXT = 2, - XR_PERF_SETTINGS_SUB_DOMAIN_THERMAL_EXT = 3; - - /** - * XrPerfSettingsLevelEXT - * - *
Enum values:
- * - *
    - *
  • {@link #XR_PERF_SETTINGS_LEVEL_POWER_SAVINGS_EXT PERF_SETTINGS_LEVEL_POWER_SAVINGS_EXT}
  • - *
  • {@link #XR_PERF_SETTINGS_LEVEL_SUSTAINED_LOW_EXT PERF_SETTINGS_LEVEL_SUSTAINED_LOW_EXT}
  • - *
  • {@link #XR_PERF_SETTINGS_LEVEL_SUSTAINED_HIGH_EXT PERF_SETTINGS_LEVEL_SUSTAINED_HIGH_EXT}
  • - *
  • {@link #XR_PERF_SETTINGS_LEVEL_BOOST_EXT PERF_SETTINGS_LEVEL_BOOST_EXT}
  • - *
- */ - public static final int - XR_PERF_SETTINGS_LEVEL_POWER_SAVINGS_EXT = 0, - XR_PERF_SETTINGS_LEVEL_SUSTAINED_LOW_EXT = 25, - XR_PERF_SETTINGS_LEVEL_SUSTAINED_HIGH_EXT = 50, - XR_PERF_SETTINGS_LEVEL_BOOST_EXT = 75; - - /** - * XrPerfSettingsNotificationLevelEXT - * - *
Enum values:
- * - *
    - *
  • {@link #XR_PERF_SETTINGS_NOTIF_LEVEL_NORMAL_EXT PERF_SETTINGS_NOTIF_LEVEL_NORMAL_EXT}
  • - *
  • {@link #XR_PERF_SETTINGS_NOTIF_LEVEL_WARNING_EXT PERF_SETTINGS_NOTIF_LEVEL_WARNING_EXT}
  • - *
  • {@link #XR_PERF_SETTINGS_NOTIF_LEVEL_IMPAIRED_EXT PERF_SETTINGS_NOTIF_LEVEL_IMPAIRED_EXT}
  • - *
- */ - public static final int - XR_PERF_SETTINGS_NOTIF_LEVEL_NORMAL_EXT = 0, - XR_PERF_SETTINGS_NOTIF_LEVEL_WARNING_EXT = 25, - XR_PERF_SETTINGS_NOTIF_LEVEL_IMPAIRED_EXT = 75; - - protected EXTPerformanceSettings() { - throw new UnsupportedOperationException(); - } - - // --- [ xrPerfSettingsSetPerformanceLevelEXT ] --- - - @NativeType("XrResult") - public static int xrPerfSettingsSetPerformanceLevelEXT(XrSession session, @NativeType("XrPerfSettingsDomainEXT") int domain, @NativeType("XrPerfSettingsLevelEXT") int level) { - long __functionAddress = session.getCapabilities().xrPerfSettingsSetPerformanceLevelEXT; - if (CHECKS) { - check(__functionAddress); - } - return callPI(session.address(), domain, level, __functionAddress); - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/EXTSamsungOdysseyController.java b/mcxr-play/src/main/java/org/lwjgl/openxr/EXTSamsungOdysseyController.java deleted file mode 100644 index 228ab14e..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/EXTSamsungOdysseyController.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -/** The EXT_samsung_odyssey_controller extension. */ -public final class EXTSamsungOdysseyController { - - /** The extension specification version. */ - public static final int XR_EXT_samsung_odyssey_controller_SPEC_VERSION = 1; - - /** The extension name. */ - public static final String XR_EXT_SAMSUNG_ODYSSEY_CONTROLLER_EXTENSION_NAME = "XR_EXT_samsung_odyssey_controller"; - - private EXTSamsungOdysseyController() {} - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/EXTThermalQuery.java b/mcxr-play/src/main/java/org/lwjgl/openxr/EXTThermalQuery.java deleted file mode 100644 index 63644cea..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/EXTThermalQuery.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.system.NativeType; - -import java.nio.FloatBuffer; -import java.nio.IntBuffer; - -import static org.lwjgl.system.Checks.CHECKS; -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.JNI.callPPPPI; -import static org.lwjgl.system.MemoryUtil.memAddress; - -/** The EXT_thermal_query extension. */ -public class EXTThermalQuery { - - /** The extension specification version. */ - public static final int XR_EXT_thermal_query_SPEC_VERSION = 2; - - /** The extension name. */ - public static final String XR_EXT_THERMAL_QUERY_EXTENSION_NAME = "XR_EXT_thermal_query"; - - protected EXTThermalQuery() { - throw new UnsupportedOperationException(); - } - - // --- [ xrThermalGetTemperatureTrendEXT ] --- - - public static int nxrThermalGetTemperatureTrendEXT(XrSession session, int domain, long notificationLevel, long tempHeadroom, long tempSlope) { - long __functionAddress = session.getCapabilities().xrThermalGetTemperatureTrendEXT; - if (CHECKS) { - check(__functionAddress); - } - return callPPPPI(session.address(), domain, notificationLevel, tempHeadroom, tempSlope, __functionAddress); - } - - @NativeType("XrResult") - public static int xrThermalGetTemperatureTrendEXT(XrSession session, @NativeType("XrPerfSettingsDomainEXT") int domain, @NativeType("XrPerfSettingsNotificationLevelEXT *") IntBuffer notificationLevel, @NativeType("float *") FloatBuffer tempHeadroom, @NativeType("float *") FloatBuffer tempSlope) { - if (CHECKS) { - check(notificationLevel, 1); - check(tempHeadroom, 1); - check(tempSlope, 1); - } - return nxrThermalGetTemperatureTrendEXT(session, domain, memAddress(notificationLevel), memAddress(tempHeadroom), memAddress(tempSlope)); - } - - /** Array version of: {@link #xrThermalGetTemperatureTrendEXT ThermalGetTemperatureTrendEXT} */ -// @NativeType("XrResult") -// public static int xrThermalGetTemperatureTrendEXT(XrSession session, @NativeType("XrPerfSettingsDomainEXT") int domain, @NativeType("XrPerfSettingsNotificationLevelEXT *") int[] notificationLevel, @NativeType("float *") float[] tempHeadroom, @NativeType("float *") float[] tempSlope) { -// long __functionAddress = session.getCapabilities().xrThermalGetTemperatureTrendEXT; -// if (CHECKS) { -// check(__functionAddress); -// check(notificationLevel, 1); -// check(tempHeadroom, 1); -// check(tempSlope, 1); -// } -// return callPPPPI(session.address(), domain, notificationLevel, tempHeadroom, tempSlope, __functionAddress); -// } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/EXTViewConfigurationDepthRange.java b/mcxr-play/src/main/java/org/lwjgl/openxr/EXTViewConfigurationDepthRange.java deleted file mode 100644 index d8df4416..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/EXTViewConfigurationDepthRange.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -/** The EXT_view_configuration_depth_range extension. */ -public final class EXTViewConfigurationDepthRange { - - /** The extension specification version. */ - public static final int XR_EXT_view_configuration_depth_range_SPEC_VERSION = 1; - - /** The extension name. */ - public static final String XR_EXT_VIEW_CONFIGURATION_DEPTH_RANGE_EXTENSION_NAME = "XR_EXT_view_configuration_depth_range"; - - /** Extends {@code XrStructureType}. */ - public static final int XR_TYPE_VIEW_CONFIGURATION_DEPTH_RANGE_EXT = 1000046000; - - private EXTViewConfigurationDepthRange() {} - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/EXTWin32AppcontainerCompatible.java b/mcxr-play/src/main/java/org/lwjgl/openxr/EXTWin32AppcontainerCompatible.java deleted file mode 100644 index c98d401c..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/EXTWin32AppcontainerCompatible.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -/** The EXT_win32_appcontainer_compatible extension. */ -public final class EXTWin32AppcontainerCompatible { - - /** The extension specification version. */ - public static final int XR_EXT_win32_appcontainer_compatible_SPEC_VERSION = 1; - - /** The extension name. */ - public static final String XR_EXT_WIN32_APPCONTAINER_COMPATIBLE_EXTENSION_NAME = "XR_EXT_win32_appcontainer_compatible"; - - private EXTWin32AppcontainerCompatible() {} - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/EXTXOverlay.java b/mcxr-play/src/main/java/org/lwjgl/openxr/EXTXOverlay.java deleted file mode 100644 index 51c09bfd..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/EXTXOverlay.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -/** The EXTX_overlay extension. */ -public final class EXTXOverlay { - - /** The extension specification version. */ - public static final int XR_EXTX_overlay_SPEC_VERSION = 5; - - /** The extension name. */ - public static final String XR_EXTX_OVERLAY_EXTENSION_NAME = "XR_EXTX_overlay"; - - /** - * Extends {@code XrStructureType}. - * - *
Enum values:
- * - *
    - *
  • {@link #XR_TYPE_SESSION_CREATE_INFO_OVERLAY_EXTX TYPE_SESSION_CREATE_INFO_OVERLAY_EXTX}
  • - *
  • {@link #XR_TYPE_EVENT_DATA_MAIN_SESSION_VISIBILITY_CHANGED_EXTX TYPE_EVENT_DATA_MAIN_SESSION_VISIBILITY_CHANGED_EXTX}
  • - *
- */ - public static final int - XR_TYPE_SESSION_CREATE_INFO_OVERLAY_EXTX = 1000033000, - XR_TYPE_EVENT_DATA_MAIN_SESSION_VISIBILITY_CHANGED_EXTX = 1000033003; - - /** XrOverlayMainSessionFlagBitsEXTX */ - public static final int XR_OVERLAY_MAIN_SESSION_ENABLED_COMPOSITION_LAYER_INFO_DEPTH_BIT_EXTX = 0x1; - - private EXTXOverlay() {} - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/FBAndroidSurfaceSwapchainCreate.java b/mcxr-play/src/main/java/org/lwjgl/openxr/FBAndroidSurfaceSwapchainCreate.java deleted file mode 100644 index bab70edb..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/FBAndroidSurfaceSwapchainCreate.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -/** The FB_android_surface_swapchain_create extension. */ -public final class FBAndroidSurfaceSwapchainCreate { - - /** The extension specification version. */ - public static final int XR_FB_android_surface_swapchain_create_SPEC_VERSION = 1; - - /** The extension name. */ - public static final String XR_FB_ANDROID_SURFACE_SWAPCHAIN_CREATE_EXTENSION_NAME = "XR_FB_android_surface_swapchain_create"; - - /** Extends {@code XrStructureType}. */ - public static final int XR_TYPE_ANDROID_SURFACE_SWAPCHAIN_CREATE_INFO_FB = 1000070000; - - /** - * XrAndroidSurfaceSwapchainFlagBitsFB - * - *
Enum values:
- * - *
    - *
  • {@link #XR_ANDROID_SURFACE_SWAPCHAIN_SYNCHRONOUS_BIT_FB ANDROID_SURFACE_SWAPCHAIN_SYNCHRONOUS_BIT_FB}
  • - *
  • {@link #XR_ANDROID_SURFACE_SWAPCHAIN_USE_TIMESTAMPS_BIT_FB ANDROID_SURFACE_SWAPCHAIN_USE_TIMESTAMPS_BIT_FB}
  • - *
- */ - public static final int - XR_ANDROID_SURFACE_SWAPCHAIN_SYNCHRONOUS_BIT_FB = 0x1, - XR_ANDROID_SURFACE_SWAPCHAIN_USE_TIMESTAMPS_BIT_FB = 0x2; - - private FBAndroidSurfaceSwapchainCreate() {} - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/FBColorSpace.java b/mcxr-play/src/main/java/org/lwjgl/openxr/FBColorSpace.java deleted file mode 100644 index 838ba372..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/FBColorSpace.java +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.system.NativeType; - -import java.nio.IntBuffer; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.callPPI; -import static org.lwjgl.system.JNI.callPPPI; -import static org.lwjgl.system.MemoryUtil.memAddress; -import static org.lwjgl.system.MemoryUtil.memAddressSafe; - -/** The FB_color_space extension. */ -public class FBColorSpace { - - /** The extension specification version. */ - public static final int XR_FB_color_space_SPEC_VERSION = 2; - - /** The extension name. */ - public static final String XR_FB_COLOR_SPACE_EXTENSION_NAME = "XR_FB_color_space"; - - /** Extends {@code XrStructureType}. */ - public static final int XR_TYPE_SYSTEM_COLOR_SPACE_PROPERTIES_FB = 1000108000; - - /** Extends {@code XrResult}. */ - public static final int XR_ERROR_COLOR_SPACE_UNSUPPORTED_FB = -1000108000; - - /** - * XrColorSpaceFB - * - *
Enum values:
- * - *
    - *
  • {@link #XR_COLOR_SPACE_UNMANAGED_FB COLOR_SPACE_UNMANAGED_FB}
  • - *
  • {@link #XR_COLOR_SPACE_REC2020_FB COLOR_SPACE_REC2020_FB}
  • - *
  • {@link #XR_COLOR_SPACE_REC709_FB COLOR_SPACE_REC709_FB}
  • - *
  • {@link #XR_COLOR_SPACE_RIFT_CV1_FB COLOR_SPACE_RIFT_CV1_FB}
  • - *
  • {@link #XR_COLOR_SPACE_RIFT_S_FB COLOR_SPACE_RIFT_S_FB}
  • - *
  • {@link #XR_COLOR_SPACE_QUEST_FB COLOR_SPACE_QUEST_FB}
  • - *
  • {@link #XR_COLOR_SPACE_P3_FB COLOR_SPACE_P3_FB}
  • - *
  • {@link #XR_COLOR_SPACE_ADOBE_RGB_FB COLOR_SPACE_ADOBE_RGB_FB}
  • - *
- */ - public static final int - XR_COLOR_SPACE_UNMANAGED_FB = 0, - XR_COLOR_SPACE_REC2020_FB = 1, - XR_COLOR_SPACE_REC709_FB = 2, - XR_COLOR_SPACE_RIFT_CV1_FB = 3, - XR_COLOR_SPACE_RIFT_S_FB = 4, - XR_COLOR_SPACE_QUEST_FB = 5, - XR_COLOR_SPACE_P3_FB = 6, - XR_COLOR_SPACE_ADOBE_RGB_FB = 7; - - protected FBColorSpace() { - throw new UnsupportedOperationException(); - } - - // --- [ xrEnumerateColorSpacesFB ] --- - - public static int nxrEnumerateColorSpacesFB(XrSession session, int colorSpaceCapacityInput, long colorSpaceCountOutput, long colorSpaces) { - long __functionAddress = session.getCapabilities().xrEnumerateColorSpacesFB; - if (CHECKS) { - check(__functionAddress); - } - return callPPPI(session.address(), colorSpaceCapacityInput, colorSpaceCountOutput, colorSpaces, __functionAddress); - } - - @NativeType("XrResult") - public static int xrEnumerateColorSpacesFB(XrSession session, @NativeType("uint32_t *") IntBuffer colorSpaceCountOutput, @Nullable @NativeType("XrColorSpaceFB *") IntBuffer colorSpaces) { - if (CHECKS) { - check(colorSpaceCountOutput, 1); - } - return nxrEnumerateColorSpacesFB(session, remainingSafe(colorSpaces), memAddress(colorSpaceCountOutput), memAddressSafe(colorSpaces)); - } - - // --- [ xrSetColorSpaceFB ] --- - - public static int nxrSetColorSpaceFB(XrSession session, long colorspace) { - long __functionAddress = session.getCapabilities().xrSetColorSpaceFB; - if (CHECKS) { - check(__functionAddress); - } - return callPPI(session.address(), colorspace, __functionAddress); - } - - @NativeType("XrResult") - public static int xrSetColorSpaceFB(XrSession session, @NativeType("XrColorSpaceFB const *") IntBuffer colorspace) { - if (CHECKS) { - check(colorspace, 1); - } - return nxrSetColorSpaceFB(session, memAddress(colorspace)); - } - - /** Array version of: {@link #xrEnumerateColorSpacesFB EnumerateColorSpacesFB} */ - @NativeType("XrResult") - public static int xrEnumerateColorSpacesFB(XrSession session, @NativeType("uint32_t *") int[] colorSpaceCountOutput, @Nullable @NativeType("XrColorSpaceFB *") int[] colorSpaces) { - long __functionAddress = session.getCapabilities().xrEnumerateColorSpacesFB; - if (CHECKS) { - check(__functionAddress); - check(colorSpaceCountOutput, 1); - } - return callPPPI(session.address(), lengthSafe(colorSpaces), colorSpaceCountOutput, colorSpaces, __functionAddress); - } - - /** Array version of: {@link #xrSetColorSpaceFB SetColorSpaceFB} */ - @NativeType("XrResult") - public static int xrSetColorSpaceFB(XrSession session, @NativeType("XrColorSpaceFB const *") int[] colorspace) { - long __functionAddress = session.getCapabilities().xrSetColorSpaceFB; - if (CHECKS) { - check(__functionAddress); - check(colorspace, 1); - } - return callPPI(session.address(), colorspace, __functionAddress); - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/FBCompositionLayerAlphaBlend.java b/mcxr-play/src/main/java/org/lwjgl/openxr/FBCompositionLayerAlphaBlend.java deleted file mode 100644 index 02a153d1..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/FBCompositionLayerAlphaBlend.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -/** The FB_composition_layer_alpha_blend extension. */ -public final class FBCompositionLayerAlphaBlend { - - /** The extension specification version. */ - public static final int XR_FB_composition_layer_alpha_blend_SPEC_VERSION = 2; - - /** The extension name. */ - public static final String XR_FB_COMPOSITION_LAYER_ALPHA_BLEND_EXTENSION_NAME = "XR_FB_composition_layer_alpha_blend"; - - /** Extends {@code XrStructureType}. */ - public static final int XR_TYPE_COMPOSITION_LAYER_ALPHA_BLEND_FB = 1000041001; - - /** - * XrBlendFactorFB - * - *
Enum values:
- * - *
    - *
  • {@link #XR_BLEND_FACTOR_ZERO_FB BLEND_FACTOR_ZERO_FB}
  • - *
  • {@link #XR_BLEND_FACTOR_ONE_FB BLEND_FACTOR_ONE_FB}
  • - *
  • {@link #XR_BLEND_FACTOR_SRC_ALPHA_FB BLEND_FACTOR_SRC_ALPHA_FB}
  • - *
  • {@link #XR_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA_FB BLEND_FACTOR_ONE_MINUS_SRC_ALPHA_FB}
  • - *
  • {@link #XR_BLEND_FACTOR_DST_ALPHA_FB BLEND_FACTOR_DST_ALPHA_FB}
  • - *
  • {@link #XR_BLEND_FACTOR_ONE_MINUS_DST_ALPHA_FB BLEND_FACTOR_ONE_MINUS_DST_ALPHA_FB}
  • - *
- */ - public static final int - XR_BLEND_FACTOR_ZERO_FB = 0, - XR_BLEND_FACTOR_ONE_FB = 1, - XR_BLEND_FACTOR_SRC_ALPHA_FB = 2, - XR_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA_FB = 3, - XR_BLEND_FACTOR_DST_ALPHA_FB = 4, - XR_BLEND_FACTOR_ONE_MINUS_DST_ALPHA_FB = 5; - - private FBCompositionLayerAlphaBlend() {} - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/FBCompositionLayerImageLayout.java b/mcxr-play/src/main/java/org/lwjgl/openxr/FBCompositionLayerImageLayout.java deleted file mode 100644 index 54088c80..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/FBCompositionLayerImageLayout.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -/** The FB_composition_layer_image_layout extension. */ -public final class FBCompositionLayerImageLayout { - - /** The extension specification version. */ - public static final int XR_FB_composition_layer_image_layout_SPEC_VERSION = 1; - - /** The extension name. */ - public static final String XR_FB_COMPOSITION_LAYER_IMAGE_LAYOUT_EXTENSION_NAME = "XR_FB_composition_layer_image_layout"; - - /** Extends {@code XrStructureType}. */ - public static final int XR_TYPE_COMPOSITION_LAYER_IMAGE_LAYOUT_FB = 1000040000; - - /** XrCompositionLayerImageLayoutFlagBitsFB */ - public static final int XR_COMPOSITION_LAYER_IMAGE_LAYOUT_VERTICAL_FLIP_BIT_FB = 0x1; - - private FBCompositionLayerImageLayout() {} - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/FBCompositionLayerSecureContent.java b/mcxr-play/src/main/java/org/lwjgl/openxr/FBCompositionLayerSecureContent.java deleted file mode 100644 index 24136200..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/FBCompositionLayerSecureContent.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -/** The FB_composition_layer_secure_content extension. */ -public final class FBCompositionLayerSecureContent { - - /** The extension specification version. */ - public static final int XR_FB_composition_layer_secure_content_SPEC_VERSION = 1; - - /** The extension name. */ - public static final String XR_FB_COMPOSITION_LAYER_SECURE_CONTENT_EXTENSION_NAME = "XR_FB_composition_layer_secure_content"; - - /** Extends {@code XrStructureType}. */ - public static final int XR_TYPE_COMPOSITION_LAYER_SECURE_CONTENT_FB = 1000072000; - - /** - * XrCompositionLayerSecureContentFlagBitsFB - * - *
Enum values:
- * - *
    - *
  • {@link #XR_COMPOSITION_LAYER_SECURE_CONTENT_EXCLUDE_LAYER_BIT_FB COMPOSITION_LAYER_SECURE_CONTENT_EXCLUDE_LAYER_BIT_FB}
  • - *
  • {@link #XR_COMPOSITION_LAYER_SECURE_CONTENT_REPLACE_LAYER_BIT_FB COMPOSITION_LAYER_SECURE_CONTENT_REPLACE_LAYER_BIT_FB}
  • - *
- */ - public static final int - XR_COMPOSITION_LAYER_SECURE_CONTENT_EXCLUDE_LAYER_BIT_FB = 0x1, - XR_COMPOSITION_LAYER_SECURE_CONTENT_REPLACE_LAYER_BIT_FB = 0x2; - - private FBCompositionLayerSecureContent() {} - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/FBDisplayRefreshRate.java b/mcxr-play/src/main/java/org/lwjgl/openxr/FBDisplayRefreshRate.java deleted file mode 100644 index 4b6a342b..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/FBDisplayRefreshRate.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.system.NativeType; - -import java.nio.FloatBuffer; -import java.nio.IntBuffer; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.memAddress; -import static org.lwjgl.system.MemoryUtil.memAddressSafe; - -/** The FB_display_refresh_rate extension. */ -public class FBDisplayRefreshRate { - - /** The extension specification version. */ - public static final int XR_FB_display_refresh_rate_SPEC_VERSION = 1; - - /** The extension name. */ - public static final String XR_FB_DISPLAY_REFRESH_RATE_EXTENSION_NAME = "XR_FB_display_refresh_rate"; - - /** Extends {@code XrStructureType}. */ - public static final int XR_TYPE_EVENT_DATA_DISPLAY_REFRESH_RATE_CHANGED_FB = 1000101000; - - /** Extends {@code XrResult}. */ - public static final int XR_ERROR_DISPLAY_REFRESH_RATE_UNSUPPORTED_FB = -1000101000; - - protected FBDisplayRefreshRate() { - throw new UnsupportedOperationException(); - } - - // --- [ xrEnumerateDisplayRefreshRatesFB ] --- - - public static int nxrEnumerateDisplayRefreshRatesFB(XrSession session, int displayRefreshRateCapacityInput, long displayRefreshRateCountOutput, long displayRefreshRates) { - long __functionAddress = session.getCapabilities().xrEnumerateDisplayRefreshRatesFB; - if (CHECKS) { - check(__functionAddress); - } - return callPPPI(session.address(), displayRefreshRateCapacityInput, displayRefreshRateCountOutput, displayRefreshRates, __functionAddress); - } - - @NativeType("XrResult") - public static int xrEnumerateDisplayRefreshRatesFB(XrSession session, @NativeType("uint32_t *") IntBuffer displayRefreshRateCountOutput, @Nullable @NativeType("float *") FloatBuffer displayRefreshRates) { - if (CHECKS) { - check(displayRefreshRateCountOutput, 1); - } - return nxrEnumerateDisplayRefreshRatesFB(session, remainingSafe(displayRefreshRates), memAddress(displayRefreshRateCountOutput), memAddressSafe(displayRefreshRates)); - } - - // --- [ xrGetDisplayRefreshRateFB ] --- - - public static int nxrGetDisplayRefreshRateFB(XrSession session, long displayRefreshRate) { - long __functionAddress = session.getCapabilities().xrGetDisplayRefreshRateFB; - if (CHECKS) { - check(__functionAddress); - } - return callPPI(session.address(), displayRefreshRate, __functionAddress); - } - - @NativeType("XrResult") - public static int xrGetDisplayRefreshRateFB(XrSession session, @NativeType("float *") FloatBuffer displayRefreshRate) { - if (CHECKS) { - check(displayRefreshRate, 1); - } - return nxrGetDisplayRefreshRateFB(session, memAddress(displayRefreshRate)); - } - - // --- [ xrRequestDisplayRefreshRateFB ] --- - - @NativeType("XrResult") - public static int xrRequestDisplayRefreshRateFB(XrSession session, float displayRefreshRate) { - long __functionAddress = session.getCapabilities().xrRequestDisplayRefreshRateFB; - if (CHECKS) { - check(__functionAddress); - } - return callPI(session.address(), displayRefreshRate, __functionAddress); - } - - /** Array version of: {@link #xrEnumerateDisplayRefreshRatesFB EnumerateDisplayRefreshRatesFB} */ -// @NativeType("XrResult") -// public static int xrEnumerateDisplayRefreshRatesFB(XrSession session, @NativeType("uint32_t *") int[] displayRefreshRateCountOutput, @Nullable @NativeType("float *") float[] displayRefreshRates) { -// long __functionAddress = session.getCapabilities().xrEnumerateDisplayRefreshRatesFB; -// if (CHECKS) { -// check(__functionAddress); -// check(displayRefreshRateCountOutput, 1); -// } -// return callPPPI(session.address(), lengthSafe(displayRefreshRates), displayRefreshRateCountOutput, displayRefreshRates, __functionAddress); -// } - - /** Array version of: {@link #xrGetDisplayRefreshRateFB GetDisplayRefreshRateFB} */ -// @NativeType("XrResult") -// public static int xrGetDisplayRefreshRateFB(XrSession session, @NativeType("float *") float[] displayRefreshRate) { -// long __functionAddress = session.getCapabilities().xrGetDisplayRefreshRateFB; -// if (CHECKS) { -// check(__functionAddress); -// check(displayRefreshRate, 1); -// } -// return callPPI(session.address(), displayRefreshRate, __functionAddress); -// } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/FBFoveation.java b/mcxr-play/src/main/java/org/lwjgl/openxr/FBFoveation.java deleted file mode 100644 index 8f15d698..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/FBFoveation.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.PointerBuffer; -import org.lwjgl.system.NativeType; - -import static org.lwjgl.system.Checks.CHECKS; -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.JNI.callPI; -import static org.lwjgl.system.JNI.callPPPI; -import static org.lwjgl.system.MemoryUtil.memAddress; - -/** The FB_foveation extension. */ -public class FBFoveation { - - /** The extension specification version. */ - public static final int XR_FB_foveation_SPEC_VERSION = 1; - - /** The extension name. */ - public static final String XR_FB_FOVEATION_EXTENSION_NAME = "XR_FB_foveation"; - - /** Extends {@code XrObjectType}. */ - public static final int XR_OBJECT_TYPE_FOVEATION_PROFILE_FB = 1000114000; - - /** - * Extends {@code XrStructureType}. - * - *
Enum values:
- * - *
    - *
  • {@link #XR_TYPE_FOVEATION_PROFILE_CREATE_INFO_FB TYPE_FOVEATION_PROFILE_CREATE_INFO_FB}
  • - *
  • {@link #XR_TYPE_SWAPCHAIN_CREATE_INFO_FOVEATION_FB TYPE_SWAPCHAIN_CREATE_INFO_FOVEATION_FB}
  • - *
  • {@link #XR_TYPE_SWAPCHAIN_STATE_FOVEATION_FB TYPE_SWAPCHAIN_STATE_FOVEATION_FB}
  • - *
- */ - public static final int - XR_TYPE_FOVEATION_PROFILE_CREATE_INFO_FB = 1000114000, - XR_TYPE_SWAPCHAIN_CREATE_INFO_FOVEATION_FB = 1000114001, - XR_TYPE_SWAPCHAIN_STATE_FOVEATION_FB = 1000114002; - - /** - * XrSwapchainCreateFoveationFlagBitsFB - * - *
Enum values:
- * - *
    - *
  • {@link #XR_SWAPCHAIN_CREATE_FOVEATION_SCALED_BIN_BIT_FB SWAPCHAIN_CREATE_FOVEATION_SCALED_BIN_BIT_FB}
  • - *
  • {@link #XR_SWAPCHAIN_CREATE_FOVEATION_FRAGMENT_DENSITY_MAP_BIT_FB SWAPCHAIN_CREATE_FOVEATION_FRAGMENT_DENSITY_MAP_BIT_FB}
  • - *
- */ - public static final int - XR_SWAPCHAIN_CREATE_FOVEATION_SCALED_BIN_BIT_FB = 0x1, - XR_SWAPCHAIN_CREATE_FOVEATION_FRAGMENT_DENSITY_MAP_BIT_FB = 0x2; - - protected FBFoveation() { - throw new UnsupportedOperationException(); - } - - // --- [ xrCreateFoveationProfileFB ] --- - - public static int nxrCreateFoveationProfileFB(XrSession session, long createInfo, long profile) { - long __functionAddress = session.getCapabilities().xrCreateFoveationProfileFB; - if (CHECKS) { - check(__functionAddress); - } - return callPPPI(session.address(), createInfo, profile, __functionAddress); - } - - @NativeType("XrResult") - public static int xrCreateFoveationProfileFB(XrSession session, @NativeType("XrFoveationProfileCreateInfoFB const *") XrFoveationProfileCreateInfoFB createInfo, @NativeType("XrFoveationProfileFB *") PointerBuffer profile) { - if (CHECKS) { - check(profile, 1); - } - return nxrCreateFoveationProfileFB(session, createInfo.address(), memAddress(profile)); - } - - // --- [ xrDestroyFoveationProfileFB ] --- - - @NativeType("XrResult") - public static int xrDestroyFoveationProfileFB(XrFoveationProfileFB profile) { - long __functionAddress = profile.getCapabilities().xrDestroyFoveationProfileFB; - if (CHECKS) { - check(__functionAddress); - } - return callPI(profile.address(), __functionAddress); - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/FBFoveationConfiguration.java b/mcxr-play/src/main/java/org/lwjgl/openxr/FBFoveationConfiguration.java deleted file mode 100644 index eac36629..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/FBFoveationConfiguration.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -/** The FB_foveation_configuration extension. */ -public final class FBFoveationConfiguration { - - /** The extension specification version. */ - public static final int XR_FB_foveation_configuration_SPEC_VERSION = 1; - - /** The extension name. */ - public static final String XR_FB_FOVEATION_CONFIGURATION_EXTENSION_NAME = "XR_FB_foveation_configuration"; - - /** Extends {@code XrStructureType}. */ - public static final int XR_TYPE_FOVEATION_LEVEL_PROFILE_CREATE_INFO_FB = 1000115000; - - /** - * XrFoveationLevelFB - * - *
Enum values:
- * - *
    - *
  • {@link #XR_FOVEATION_LEVEL_NONE_FB FOVEATION_LEVEL_NONE_FB}
  • - *
  • {@link #XR_FOVEATION_LEVEL_LOW_FB FOVEATION_LEVEL_LOW_FB}
  • - *
  • {@link #XR_FOVEATION_LEVEL_MEDIUM_FB FOVEATION_LEVEL_MEDIUM_FB}
  • - *
  • {@link #XR_FOVEATION_LEVEL_HIGH_FB FOVEATION_LEVEL_HIGH_FB}
  • - *
- */ - public static final int - XR_FOVEATION_LEVEL_NONE_FB = 0, - XR_FOVEATION_LEVEL_LOW_FB = 1, - XR_FOVEATION_LEVEL_MEDIUM_FB = 2, - XR_FOVEATION_LEVEL_HIGH_FB = 3; - - /** - * XrFoveationDynamicFB - * - *
Enum values:
- * - *
    - *
  • {@link #XR_FOVEATION_DYNAMIC_DISABLED_FB FOVEATION_DYNAMIC_DISABLED_FB}
  • - *
  • {@link #XR_FOVEATION_DYNAMIC_LEVEL_ENABLED_FB FOVEATION_DYNAMIC_LEVEL_ENABLED_FB}
  • - *
- */ - public static final int - XR_FOVEATION_DYNAMIC_DISABLED_FB = 0, - XR_FOVEATION_DYNAMIC_LEVEL_ENABLED_FB = 1; - - private FBFoveationConfiguration() {} - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/FBHandTrackingAim.java b/mcxr-play/src/main/java/org/lwjgl/openxr/FBHandTrackingAim.java deleted file mode 100644 index 0aa27212..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/FBHandTrackingAim.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -/** The FB_hand_tracking_aim extension. */ -public final class FBHandTrackingAim { - - /** The extension specification version. */ - public static final int XR_FB_hand_tracking_aim_SPEC_VERSION = 1; - - /** The extension name. */ - public static final String XR_FB_HAND_TRACKING_AIM_EXTENSION_NAME = "XR_FB_hand_tracking_aim"; - - /** Extends {@code XrStructureType}. */ - public static final int XR_TYPE_HAND_TRACKING_AIM_STATE_FB = 1000111001; - - /** - * XrHandTrackingAimFlagBitsFB - * - *
Enum values:
- * - *
    - *
  • {@link #XR_HAND_TRACKING_AIM_COMPUTED_BIT_FB HAND_TRACKING_AIM_COMPUTED_BIT_FB}
  • - *
  • {@link #XR_HAND_TRACKING_AIM_VALID_BIT_FB HAND_TRACKING_AIM_VALID_BIT_FB}
  • - *
  • {@link #XR_HAND_TRACKING_AIM_INDEX_PINCHING_BIT_FB HAND_TRACKING_AIM_INDEX_PINCHING_BIT_FB}
  • - *
  • {@link #XR_HAND_TRACKING_AIM_MIDDLE_PINCHING_BIT_FB HAND_TRACKING_AIM_MIDDLE_PINCHING_BIT_FB}
  • - *
  • {@link #XR_HAND_TRACKING_AIM_RING_PINCHING_BIT_FB HAND_TRACKING_AIM_RING_PINCHING_BIT_FB}
  • - *
  • {@link #XR_HAND_TRACKING_AIM_LITTLE_PINCHING_BIT_FB HAND_TRACKING_AIM_LITTLE_PINCHING_BIT_FB}
  • - *
  • {@link #XR_HAND_TRACKING_AIM_SYSTEM_GESTURE_BIT_FB HAND_TRACKING_AIM_SYSTEM_GESTURE_BIT_FB}
  • - *
  • {@link #XR_HAND_TRACKING_AIM_DOMINANT_HAND_BIT_FB HAND_TRACKING_AIM_DOMINANT_HAND_BIT_FB}
  • - *
  • {@link #XR_HAND_TRACKING_AIM_MENU_PRESSED_BIT_FB HAND_TRACKING_AIM_MENU_PRESSED_BIT_FB}
  • - *
- */ - public static final int - XR_HAND_TRACKING_AIM_COMPUTED_BIT_FB = 0x1, - XR_HAND_TRACKING_AIM_VALID_BIT_FB = 0x2, - XR_HAND_TRACKING_AIM_INDEX_PINCHING_BIT_FB = 0x4, - XR_HAND_TRACKING_AIM_MIDDLE_PINCHING_BIT_FB = 0x8, - XR_HAND_TRACKING_AIM_RING_PINCHING_BIT_FB = 0x10, - XR_HAND_TRACKING_AIM_LITTLE_PINCHING_BIT_FB = 0x20, - XR_HAND_TRACKING_AIM_SYSTEM_GESTURE_BIT_FB = 0x40, - XR_HAND_TRACKING_AIM_DOMINANT_HAND_BIT_FB = 0x80, - XR_HAND_TRACKING_AIM_MENU_PRESSED_BIT_FB = 0x100; - - private FBHandTrackingAim() {} - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/FBHandTrackingCapsules.java b/mcxr-play/src/main/java/org/lwjgl/openxr/FBHandTrackingCapsules.java deleted file mode 100644 index bea7a92f..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/FBHandTrackingCapsules.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -/** The FB_hand_tracking_capsules extension. */ -public final class FBHandTrackingCapsules { - - /** The extension specification version. */ - public static final int XR_FB_hand_tracking_capsules_SPEC_VERSION = 1; - - /** The extension name. */ - public static final String XR_FB_HAND_TRACKING_CAPSULES_EXTENSION_NAME = "XR_FB_hand_tracking_capsules"; - - /** XR_FB_HAND_TRACKING_CAPSULE_POINT_COUNT */ - public static final int XR_FB_HAND_TRACKING_CAPSULE_POINT_COUNT = 2; - - /** XR_FB_HAND_TRACKING_CAPSULE_COUNT */ - public static final int XR_FB_HAND_TRACKING_CAPSULE_COUNT = 19; - - /** Extends {@code XrStructureType}. */ - public static final int XR_TYPE_HAND_TRACKING_CAPSULES_STATE_FB = 1000112000; - - private FBHandTrackingCapsules() {} - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/FBHandTrackingMesh.java b/mcxr-play/src/main/java/org/lwjgl/openxr/FBHandTrackingMesh.java deleted file mode 100644 index 07542b97..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/FBHandTrackingMesh.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.system.NativeType; - -import static org.lwjgl.system.Checks.CHECKS; -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.JNI.callPPI; - -/** The FB_hand_tracking_mesh extension. */ -public class FBHandTrackingMesh { - - /** The extension specification version. */ - public static final int XR_FB_hand_tracking_mesh_SPEC_VERSION = 1; - - /** The extension name. */ - public static final String XR_FB_HAND_TRACKING_MESH_EXTENSION_NAME = "XR_FB_hand_tracking_mesh"; - - /** - * Extends {@code XrStructureType}. - * - *
Enum values:
- * - *
    - *
  • {@link #XR_TYPE_HAND_TRACKING_MESH_FB TYPE_HAND_TRACKING_MESH_FB}
  • - *
  • {@link #XR_TYPE_HAND_TRACKING_SCALE_FB TYPE_HAND_TRACKING_SCALE_FB}
  • - *
- */ - public static final int - XR_TYPE_HAND_TRACKING_MESH_FB = 1000110001, - XR_TYPE_HAND_TRACKING_SCALE_FB = 1000110003; - - protected FBHandTrackingMesh() { - throw new UnsupportedOperationException(); - } - - // --- [ xrGetHandMeshFB ] --- - - public static int nxrGetHandMeshFB(XrHandTrackerEXT handTracker, long mesh) { - long __functionAddress = handTracker.getCapabilities().xrGetHandMeshFB; - if (CHECKS) { - check(__functionAddress); - } - return callPPI(handTracker.address(), mesh, __functionAddress); - } - - @NativeType("XrResult") - public static int xrGetHandMeshFB(XrHandTrackerEXT handTracker, @NativeType("XrHandTrackingMeshFB *") XrHandTrackingMeshFB mesh) { - return nxrGetHandMeshFB(handTracker, mesh.address()); - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/FBPassthrough.java b/mcxr-play/src/main/java/org/lwjgl/openxr/FBPassthrough.java deleted file mode 100644 index eeb7dfbb..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/FBPassthrough.java +++ /dev/null @@ -1,300 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.PointerBuffer; -import org.lwjgl.system.NativeType; - -import static org.lwjgl.system.Checks.CHECKS; -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.memAddress; - -/** The FB_passthrough extension. */ -public class FBPassthrough { - - /** The extension specification version. */ - public static final int XR_FB_passthrough_SPEC_VERSION = 1; - - /** The extension name. */ - public static final String XR_FB_PASSTHROUGH_EXTENSION_NAME = "XR_FB_passthrough"; - - /** - * Extends {@code XrStructureType}. - * - *
Enum values:
- * - *
    - *
  • {@link #XR_TYPE_SYSTEM_PASSTHROUGH_PROPERTIES_FB TYPE_SYSTEM_PASSTHROUGH_PROPERTIES_FB}
  • - *
  • {@link #XR_TYPE_PASSTHROUGH_CREATE_INFO_FB TYPE_PASSTHROUGH_CREATE_INFO_FB}
  • - *
  • {@link #XR_TYPE_PASSTHROUGH_LAYER_CREATE_INFO_FB TYPE_PASSTHROUGH_LAYER_CREATE_INFO_FB}
  • - *
  • {@link #XR_TYPE_COMPOSITION_LAYER_PASSTHROUGH_FB TYPE_COMPOSITION_LAYER_PASSTHROUGH_FB}
  • - *
  • {@link #XR_TYPE_GEOMETRY_INSTANCE_CREATE_INFO_FB TYPE_GEOMETRY_INSTANCE_CREATE_INFO_FB}
  • - *
  • {@link #XR_TYPE_GEOMETRY_INSTANCE_TRANSFORM_FB TYPE_GEOMETRY_INSTANCE_TRANSFORM_FB}
  • - *
  • {@link #XR_TYPE_PASSTHROUGH_STYLE_FB TYPE_PASSTHROUGH_STYLE_FB}
  • - *
  • {@link #XR_TYPE_PASSTHROUGH_COLOR_MAP_MONO_TO_RGBA_FB TYPE_PASSTHROUGH_COLOR_MAP_MONO_TO_RGBA_FB}
  • - *
  • {@link #XR_TYPE_PASSTHROUGH_COLOR_MAP_MONO_TO_MONO_FB TYPE_PASSTHROUGH_COLOR_MAP_MONO_TO_MONO_FB}
  • - *
  • {@link #XR_TYPE_EVENT_DATA_PASSTHROUGH_STATE_CHANGED_FB TYPE_EVENT_DATA_PASSTHROUGH_STATE_CHANGED_FB}
  • - *
- */ - public static final int - XR_TYPE_SYSTEM_PASSTHROUGH_PROPERTIES_FB = 1000118000, - XR_TYPE_PASSTHROUGH_CREATE_INFO_FB = 1000118001, - XR_TYPE_PASSTHROUGH_LAYER_CREATE_INFO_FB = 1000118002, - XR_TYPE_COMPOSITION_LAYER_PASSTHROUGH_FB = 1000118003, - XR_TYPE_GEOMETRY_INSTANCE_CREATE_INFO_FB = 1000118004, - XR_TYPE_GEOMETRY_INSTANCE_TRANSFORM_FB = 1000118005, - XR_TYPE_PASSTHROUGH_STYLE_FB = 1000118020, - XR_TYPE_PASSTHROUGH_COLOR_MAP_MONO_TO_RGBA_FB = 1000118021, - XR_TYPE_PASSTHROUGH_COLOR_MAP_MONO_TO_MONO_FB = 1000118022, - XR_TYPE_EVENT_DATA_PASSTHROUGH_STATE_CHANGED_FB = 1000118030; - - /** - * Extends {@code XrResult}. - * - *
Enum values:
- * - *
    - *
  • {@link #XR_ERROR_UNEXPECTED_STATE_PASSTHROUGH_FB ERROR_UNEXPECTED_STATE_PASSTHROUGH_FB}
  • - *
  • {@link #XR_ERROR_FEATURE_ALREADY_CREATED_PASSTHROUGH_FB ERROR_FEATURE_ALREADY_CREATED_PASSTHROUGH_FB}
  • - *
  • {@link #XR_ERROR_FEATURE_REQUIRED_PASSTHROUGH_FB ERROR_FEATURE_REQUIRED_PASSTHROUGH_FB}
  • - *
  • {@link #XR_ERROR_NOT_PERMITTED_PASSTHROUGH_FB ERROR_NOT_PERMITTED_PASSTHROUGH_FB}
  • - *
  • {@link #XR_ERROR_INSUFFICIENT_RESOURCES_PASSTHROUGH_FB ERROR_INSUFFICIENT_RESOURCES_PASSTHROUGH_FB}
  • - *
  • {@link #XR_ERROR_UNKNOWN_PASSTHROUGH_FB ERROR_UNKNOWN_PASSTHROUGH_FB}
  • - *
- */ - public static final int - XR_ERROR_UNEXPECTED_STATE_PASSTHROUGH_FB = -1000118000, - XR_ERROR_FEATURE_ALREADY_CREATED_PASSTHROUGH_FB = -1000118001, - XR_ERROR_FEATURE_REQUIRED_PASSTHROUGH_FB = -1000118002, - XR_ERROR_NOT_PERMITTED_PASSTHROUGH_FB = -1000118003, - XR_ERROR_INSUFFICIENT_RESOURCES_PASSTHROUGH_FB = -1000118004, - XR_ERROR_UNKNOWN_PASSTHROUGH_FB = -1000118050; - - /** XR_PASSTHROUGH_COLOR_MAP_MONO_SIZE_FB */ - public static final int XR_PASSTHROUGH_COLOR_MAP_MONO_SIZE_FB = 256; - - /** - * Extends {@code XrObjectType}. - * - *
Enum values:
- * - *
    - *
  • {@link #XR_OBJECT_TYPE_PASSTHROUGH_FB OBJECT_TYPE_PASSTHROUGH_FB}
  • - *
  • {@link #XR_OBJECT_TYPE_PASSTHROUGH_LAYER_FB OBJECT_TYPE_PASSTHROUGH_LAYER_FB}
  • - *
  • {@link #XR_OBJECT_TYPE_GEOMETRY_INSTANCE_FB OBJECT_TYPE_GEOMETRY_INSTANCE_FB}
  • - *
- */ - public static final int - XR_OBJECT_TYPE_PASSTHROUGH_FB = 1000118000, - XR_OBJECT_TYPE_PASSTHROUGH_LAYER_FB = 1000118002, - XR_OBJECT_TYPE_GEOMETRY_INSTANCE_FB = 1000118004; - - /** XrPassthroughFlagBitsFB */ - public static final int XR_PASSTHROUGH_IS_RUNNING_AT_CREATION_BIT_FB = 0x1; - - /** - * XrPassthroughLayerPurposeFB - * - *
Enum values:
- * - *
    - *
  • {@link #XR_PASSTHROUGH_LAYER_PURPOSE_RECONSTRUCTION_FB PASSTHROUGH_LAYER_PURPOSE_RECONSTRUCTION_FB}
  • - *
  • {@link #XR_PASSTHROUGH_LAYER_PURPOSE_PROJECTED_FB PASSTHROUGH_LAYER_PURPOSE_PROJECTED_FB}
  • - *
- */ - public static final int - XR_PASSTHROUGH_LAYER_PURPOSE_RECONSTRUCTION_FB = 0, - XR_PASSTHROUGH_LAYER_PURPOSE_PROJECTED_FB = 1; - - /** - * XrPassthroughStateChangedFlagBitsFB - * - *
Enum values:
- * - *
    - *
  • {@link #XR_PASSTHROUGH_STATE_CHANGED_REINIT_REQUIRED_BIT_FB PASSTHROUGH_STATE_CHANGED_REINIT_REQUIRED_BIT_FB}
  • - *
  • {@link #XR_PASSTHROUGH_STATE_CHANGED_NON_RECOVERABLE_ERROR_BIT_FB PASSTHROUGH_STATE_CHANGED_NON_RECOVERABLE_ERROR_BIT_FB}
  • - *
  • {@link #XR_PASSTHROUGH_STATE_CHANGED_RECOVERABLE_ERROR_BIT_FB PASSTHROUGH_STATE_CHANGED_RECOVERABLE_ERROR_BIT_FB}
  • - *
  • {@link #XR_PASSTHROUGH_STATE_CHANGED_RESTORED_ERROR_BIT_FB PASSTHROUGH_STATE_CHANGED_RESTORED_ERROR_BIT_FB}
  • - *
- */ - public static final int - XR_PASSTHROUGH_STATE_CHANGED_REINIT_REQUIRED_BIT_FB = 0x1, - XR_PASSTHROUGH_STATE_CHANGED_NON_RECOVERABLE_ERROR_BIT_FB = 0x2, - XR_PASSTHROUGH_STATE_CHANGED_RECOVERABLE_ERROR_BIT_FB = 0x4, - XR_PASSTHROUGH_STATE_CHANGED_RESTORED_ERROR_BIT_FB = 0x8; - - protected FBPassthrough() { - throw new UnsupportedOperationException(); - } - - // --- [ xrCreatePassthroughFB ] --- - - public static int nxrCreatePassthroughFB(XrSession session, long createInfo, long outPassthrough) { - long __functionAddress = session.getCapabilities().xrCreatePassthroughFB; - if (CHECKS) { - check(__functionAddress); - } - return callPPPI(session.address(), createInfo, outPassthrough, __functionAddress); - } - - @NativeType("XrResult") - public static int xrCreatePassthroughFB(XrSession session, @NativeType("XrPassthroughCreateInfoFB const *") XrPassthroughCreateInfoFB createInfo, @NativeType("XrPassthroughFB *") PointerBuffer outPassthrough) { - if (CHECKS) { - check(outPassthrough, 1); - } - return nxrCreatePassthroughFB(session, createInfo.address(), memAddress(outPassthrough)); - } - - // --- [ xrDestroyPassthroughFB ] --- - - @NativeType("XrResult") - public static int xrDestroyPassthroughFB(XrPassthroughFB passthrough) { - long __functionAddress = passthrough.getCapabilities().xrDestroyPassthroughFB; - if (CHECKS) { - check(__functionAddress); - } - return callPI(passthrough.address(), __functionAddress); - } - - // --- [ xrPassthroughStartFB ] --- - - @NativeType("XrResult") - public static int xrPassthroughStartFB(XrPassthroughFB passthrough) { - long __functionAddress = passthrough.getCapabilities().xrPassthroughStartFB; - if (CHECKS) { - check(__functionAddress); - } - return callPI(passthrough.address(), __functionAddress); - } - - // --- [ xrPassthroughPauseFB ] --- - - @NativeType("XrResult") - public static int xrPassthroughPauseFB(XrPassthroughFB passthrough) { - long __functionAddress = passthrough.getCapabilities().xrPassthroughPauseFB; - if (CHECKS) { - check(__functionAddress); - } - return callPI(passthrough.address(), __functionAddress); - } - - // --- [ xrCreatePassthroughLayerFB ] --- - - public static int nxrCreatePassthroughLayerFB(XrSession session, long createInfo, long outLayer) { - long __functionAddress = session.getCapabilities().xrCreatePassthroughLayerFB; - if (CHECKS) { - check(__functionAddress); - XrPassthroughLayerCreateInfoFB.validate(createInfo); - } - return callPPPI(session.address(), createInfo, outLayer, __functionAddress); - } - - @NativeType("XrResult") - public static int xrCreatePassthroughLayerFB(XrSession session, @NativeType("XrPassthroughLayerCreateInfoFB const *") XrPassthroughLayerCreateInfoFB createInfo, @NativeType("XrPassthroughLayerFB *") PointerBuffer outLayer) { - if (CHECKS) { - check(outLayer, 1); - } - return nxrCreatePassthroughLayerFB(session, createInfo.address(), memAddress(outLayer)); - } - - // --- [ xrDestroyPassthroughLayerFB ] --- - - @NativeType("XrResult") - public static int xrDestroyPassthroughLayerFB(XrPassthroughLayerFB layer) { - long __functionAddress = layer.getCapabilities().xrDestroyPassthroughLayerFB; - if (CHECKS) { - check(__functionAddress); - } - return callPI(layer.address(), __functionAddress); - } - - // --- [ xrPassthroughLayerPauseFB ] --- - - @NativeType("XrResult") - public static int xrPassthroughLayerPauseFB(XrPassthroughLayerFB layer) { - long __functionAddress = layer.getCapabilities().xrPassthroughLayerPauseFB; - if (CHECKS) { - check(__functionAddress); - } - return callPI(layer.address(), __functionAddress); - } - - // --- [ xrPassthroughLayerResumeFB ] --- - - @NativeType("XrResult") - public static int xrPassthroughLayerResumeFB(XrPassthroughLayerFB layer) { - long __functionAddress = layer.getCapabilities().xrPassthroughLayerResumeFB; - if (CHECKS) { - check(__functionAddress); - } - return callPI(layer.address(), __functionAddress); - } - - // --- [ xrPassthroughLayerSetStyleFB ] --- - - public static int nxrPassthroughLayerSetStyleFB(XrPassthroughLayerFB layer, long style) { - long __functionAddress = layer.getCapabilities().xrPassthroughLayerSetStyleFB; - if (CHECKS) { - check(__functionAddress); - } - return callPPI(layer.address(), style, __functionAddress); - } - - @NativeType("XrResult") - public static int xrPassthroughLayerSetStyleFB(XrPassthroughLayerFB layer, @NativeType("XrPassthroughStyleFB const *") XrPassthroughStyleFB style) { - return nxrPassthroughLayerSetStyleFB(layer, style.address()); - } - - // --- [ xrCreateGeometryInstanceFB ] --- - - public static int nxrCreateGeometryInstanceFB(XrSession session, long createInfo, long outGeometryInstance) { - long __functionAddress = session.getCapabilities().xrCreateGeometryInstanceFB; - if (CHECKS) { - check(__functionAddress); - XrGeometryInstanceCreateInfoFB.validate(createInfo); - } - return callPPPI(session.address(), createInfo, outGeometryInstance, __functionAddress); - } - - @NativeType("XrResult") - public static int xrCreateGeometryInstanceFB(XrSession session, @NativeType("XrGeometryInstanceCreateInfoFB const *") XrGeometryInstanceCreateInfoFB createInfo, @NativeType("XrGeometryInstanceFB *") PointerBuffer outGeometryInstance) { - if (CHECKS) { - check(outGeometryInstance, 1); - } - return nxrCreateGeometryInstanceFB(session, createInfo.address(), memAddress(outGeometryInstance)); - } - - // --- [ xrDestroyGeometryInstanceFB ] --- - - @NativeType("XrResult") - public static int xrDestroyGeometryInstanceFB(XrGeometryInstanceFB instance) { - long __functionAddress = instance.getCapabilities().xrDestroyGeometryInstanceFB; - if (CHECKS) { - check(__functionAddress); - } - return callPI(instance.address(), __functionAddress); - } - - // --- [ xrGeometryInstanceSetTransformFB ] --- - - public static int nxrGeometryInstanceSetTransformFB(XrGeometryInstanceFB instance, long transformation) { - long __functionAddress = instance.getCapabilities().xrGeometryInstanceSetTransformFB; - if (CHECKS) { - check(__functionAddress); - XrGeometryInstanceTransformFB.validate(transformation); - } - return callPPI(instance.address(), transformation, __functionAddress); - } - - @NativeType("XrResult") - public static int xrGeometryInstanceSetTransformFB(XrGeometryInstanceFB instance, @NativeType("XrGeometryInstanceTransformFB const *") XrGeometryInstanceTransformFB transformation) { - return nxrGeometryInstanceSetTransformFB(instance, transformation.address()); - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/FBSpaceWarp.java b/mcxr-play/src/main/java/org/lwjgl/openxr/FBSpaceWarp.java deleted file mode 100644 index 79cb6b30..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/FBSpaceWarp.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -/** The FB_space_warp extension. */ -public final class FBSpaceWarp { - - /** The extension specification version. */ - public static final int XR_FB_space_warp_SPEC_VERSION = 1; - - /** The extension name. */ - public static final String XR_FB_SPACE_WARP_EXTENSION_NAME = "XR_FB_space_warp"; - - /** - * Extends {@code XrStructureType}. - * - *
Enum values:
- * - *
    - *
  • {@link #XR_TYPE_COMPOSITION_LAYER_SPACE_WARP_INFO_FB TYPE_COMPOSITION_LAYER_SPACE_WARP_INFO_FB}
  • - *
  • {@link #XR_TYPE_SYSTEM_SPACE_WARP_PROPERTIES_FB TYPE_SYSTEM_SPACE_WARP_PROPERTIES_FB}
  • - *
- */ - public static final int - XR_TYPE_COMPOSITION_LAYER_SPACE_WARP_INFO_FB = 1000171000, - XR_TYPE_SYSTEM_SPACE_WARP_PROPERTIES_FB = 1000171001; - - private FBSpaceWarp() {} - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/FBSwapchainUpdateState.java b/mcxr-play/src/main/java/org/lwjgl/openxr/FBSwapchainUpdateState.java deleted file mode 100644 index 32f5066a..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/FBSwapchainUpdateState.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.system.NativeType; - -import static org.lwjgl.system.Checks.CHECKS; -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.JNI.callPPI; - -/** The FB_swapchain_update_state extension. */ -public class FBSwapchainUpdateState { - - /** The extension specification version. */ - public static final int XR_FB_swapchain_update_state_SPEC_VERSION = 3; - - /** The extension name. */ - public static final String XR_FB_SWAPCHAIN_UPDATE_STATE_EXTENSION_NAME = "XR_FB_swapchain_update_state"; - - protected FBSwapchainUpdateState() { - throw new UnsupportedOperationException(); - } - - // --- [ xrUpdateSwapchainFB ] --- - - public static int nxrUpdateSwapchainFB(XrSwapchain swapchain, long state) { - long __functionAddress = swapchain.getCapabilities().xrUpdateSwapchainFB; - if (CHECKS) { - check(__functionAddress); - } - return callPPI(swapchain.address(), state, __functionAddress); - } - - @NativeType("XrResult") - public static int xrUpdateSwapchainFB(XrSwapchain swapchain, @NativeType("XrSwapchainStateBaseHeaderFB const *") XrSwapchainStateBaseHeaderFB state) { - return nxrUpdateSwapchainFB(swapchain, state.address()); - } - - // --- [ xrGetSwapchainStateFB ] --- - - public static int nxrGetSwapchainStateFB(XrSwapchain swapchain, long state) { - long __functionAddress = swapchain.getCapabilities().xrGetSwapchainStateFB; - if (CHECKS) { - check(__functionAddress); - } - return callPPI(swapchain.address(), state, __functionAddress); - } - - @NativeType("XrResult") - public static int xrGetSwapchainStateFB(XrSwapchain swapchain, @NativeType("XrSwapchainStateBaseHeaderFB *") XrSwapchainStateBaseHeaderFB state) { - return nxrGetSwapchainStateFB(swapchain, state.address()); - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/FBSwapchainUpdateStateAndroidSurface.java b/mcxr-play/src/main/java/org/lwjgl/openxr/FBSwapchainUpdateStateAndroidSurface.java deleted file mode 100644 index 3fcd0c06..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/FBSwapchainUpdateStateAndroidSurface.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -/** The FB_swapchain_update_state_android_surface extension. */ -public final class FBSwapchainUpdateStateAndroidSurface { - - /** The extension specification version. */ - public static final int XR_FB_swapchain_update_state_android_surface_SPEC_VERSION = 1; - - /** The extension name. */ - public static final String XR_FB_SWAPCHAIN_UPDATE_STATE_ANDROID_SURFACE_EXTENSION_NAME = "XR_FB_swapchain_update_state_android_surface"; - - /** Extends {@code XrStructureType}. */ - public static final int XR_TYPE_SWAPCHAIN_STATE_ANDROID_SURFACE_DIMENSIONS_FB = 1000161000; - - private FBSwapchainUpdateStateAndroidSurface() {} - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/FBSwapchainUpdateStateOpenglEs.java b/mcxr-play/src/main/java/org/lwjgl/openxr/FBSwapchainUpdateStateOpenglEs.java deleted file mode 100644 index a7899636..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/FBSwapchainUpdateStateOpenglEs.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -/** The FB_swapchain_update_state_opengl_es extension. */ -public final class FBSwapchainUpdateStateOpenglEs { - - /** The extension specification version. */ - public static final int XR_FB_swapchain_update_state_opengl_es_SPEC_VERSION = 1; - - /** The extension name. */ - public static final String XR_FB_SWAPCHAIN_UPDATE_STATE_OPENGL_ES_EXTENSION_NAME = "XR_FB_swapchain_update_state_opengl_es"; - - /** Extends {@code XrStructureType}. */ - public static final int XR_TYPE_SWAPCHAIN_STATE_SAMPLER_OPENGL_ES_FB = 1000162000; - - private FBSwapchainUpdateStateOpenglEs() {} - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/FBTriangleMesh.java b/mcxr-play/src/main/java/org/lwjgl/openxr/FBTriangleMesh.java deleted file mode 100644 index 06de49a9..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/FBTriangleMesh.java +++ /dev/null @@ -1,184 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.PointerBuffer; -import org.lwjgl.system.NativeType; - -import java.nio.IntBuffer; - -import static org.lwjgl.system.Checks.CHECKS; -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.memAddress; - -/** The FB_triangle_mesh extension. */ -public class FBTriangleMesh { - - /** The extension specification version. */ - public static final int XR_FB_triangle_mesh_SPEC_VERSION = 1; - - /** The extension name. */ - public static final String XR_FB_TRIANGLE_MESH_EXTENSION_NAME = "XR_FB_triangle_mesh"; - - /** Extends {@code XrStructureType}. */ - public static final int XR_TYPE_TRIANGLE_MESH_CREATE_INFO_FB = 1000117001; - - /** Extends {@code XrObjectType}. */ - public static final int XR_OBJECT_TYPE_TRIANGLE_MESH_FB = 1000117000; - - /** XrTriangleMeshFlagBitsFB */ - public static final int XR_TRIANGLE_MESH_MUTABLE_BIT_FB = 0x1; - - /** - * XrWindingOrderFB - * - *
Enum values:
- * - *
    - *
  • {@link #XR_WINDING_ORDER_UNKNOWN_FB WINDING_ORDER_UNKNOWN_FB}
  • - *
  • {@link #XR_WINDING_ORDER_CW_FB WINDING_ORDER_CW_FB}
  • - *
  • {@link #XR_WINDING_ORDER_CCW_FB WINDING_ORDER_CCW_FB}
  • - *
- */ - public static final int - XR_WINDING_ORDER_UNKNOWN_FB = 0, - XR_WINDING_ORDER_CW_FB = 1, - XR_WINDING_ORDER_CCW_FB = 2; - - protected FBTriangleMesh() { - throw new UnsupportedOperationException(); - } - - // --- [ xrCreateTriangleMeshFB ] --- - - public static int nxrCreateTriangleMeshFB(XrSession session, long createInfo, long outTriangleMesh) { - long __functionAddress = session.getCapabilities().xrCreateTriangleMeshFB; - if (CHECKS) { - check(__functionAddress); - } - return callPPPI(session.address(), createInfo, outTriangleMesh, __functionAddress); - } - - @NativeType("XrResult") - public static int xrCreateTriangleMeshFB(XrSession session, @NativeType("XrTriangleMeshCreateInfoFB const *") XrTriangleMeshCreateInfoFB createInfo, @NativeType("XrTriangleMeshFB *") PointerBuffer outTriangleMesh) { - if (CHECKS) { - check(outTriangleMesh, 1); - } - return nxrCreateTriangleMeshFB(session, createInfo.address(), memAddress(outTriangleMesh)); - } - - // --- [ xrDestroyTriangleMeshFB ] --- - - @NativeType("XrResult") - public static int xrDestroyTriangleMeshFB(XrTriangleMeshFB mesh) { - long __functionAddress = mesh.getCapabilities().xrDestroyTriangleMeshFB; - if (CHECKS) { - check(__functionAddress); - } - return callPI(mesh.address(), __functionAddress); - } - - // --- [ xrTriangleMeshGetVertexBufferFB ] --- - - public static int nxrTriangleMeshGetVertexBufferFB(XrTriangleMeshFB mesh, long outVertexBuffer) { - long __functionAddress = mesh.getCapabilities().xrTriangleMeshGetVertexBufferFB; - if (CHECKS) { - check(__functionAddress); - } - return callPPI(mesh.address(), outVertexBuffer, __functionAddress); - } - - @NativeType("XrResult") - public static int xrTriangleMeshGetVertexBufferFB(XrTriangleMeshFB mesh, @NativeType("XrVector3f **") PointerBuffer outVertexBuffer) { - if (CHECKS) { - check(outVertexBuffer, 1); - } - return nxrTriangleMeshGetVertexBufferFB(mesh, memAddress(outVertexBuffer)); - } - - // --- [ xrTriangleMeshGetIndexBufferFB ] --- - - public static int nxrTriangleMeshGetIndexBufferFB(XrTriangleMeshFB mesh, long outIndexBuffer) { - long __functionAddress = mesh.getCapabilities().xrTriangleMeshGetIndexBufferFB; - if (CHECKS) { - check(__functionAddress); - } - return callPPI(mesh.address(), outIndexBuffer, __functionAddress); - } - - @NativeType("XrResult") - public static int xrTriangleMeshGetIndexBufferFB(XrTriangleMeshFB mesh, @NativeType("uint32_t **") PointerBuffer outIndexBuffer) { - if (CHECKS) { - check(outIndexBuffer, 1); - } - return nxrTriangleMeshGetIndexBufferFB(mesh, memAddress(outIndexBuffer)); - } - - // --- [ xrTriangleMeshBeginUpdateFB ] --- - - @NativeType("XrResult") - public static int xrTriangleMeshBeginUpdateFB(XrTriangleMeshFB mesh) { - long __functionAddress = mesh.getCapabilities().xrTriangleMeshBeginUpdateFB; - if (CHECKS) { - check(__functionAddress); - } - return callPI(mesh.address(), __functionAddress); - } - - // --- [ xrTriangleMeshEndUpdateFB ] --- - - @NativeType("XrResult") - public static int xrTriangleMeshEndUpdateFB(XrTriangleMeshFB mesh, @NativeType("uint32_t") int vertexCount, @NativeType("uint32_t") int triangleCount) { - long __functionAddress = mesh.getCapabilities().xrTriangleMeshEndUpdateFB; - if (CHECKS) { - check(__functionAddress); - } - return callPI(mesh.address(), vertexCount, triangleCount, __functionAddress); - } - - // --- [ xrTriangleMeshBeginVertexBufferUpdateFB ] --- - - public static int nxrTriangleMeshBeginVertexBufferUpdateFB(XrTriangleMeshFB mesh, long outVertexCount) { - long __functionAddress = mesh.getCapabilities().xrTriangleMeshBeginVertexBufferUpdateFB; - if (CHECKS) { - check(__functionAddress); - } - return callPPI(mesh.address(), outVertexCount, __functionAddress); - } - - @NativeType("XrResult") - public static int xrTriangleMeshBeginVertexBufferUpdateFB(XrTriangleMeshFB mesh, @NativeType("uint32_t *") IntBuffer outVertexCount) { - if (CHECKS) { - check(outVertexCount, 1); - } - return nxrTriangleMeshBeginVertexBufferUpdateFB(mesh, memAddress(outVertexCount)); - } - - // --- [ xrTriangleMeshEndVertexBufferUpdateFB ] --- - - @NativeType("XrResult") - public static int xrTriangleMeshEndVertexBufferUpdateFB(XrTriangleMeshFB mesh) { - long __functionAddress = mesh.getCapabilities().xrTriangleMeshEndVertexBufferUpdateFB; - if (CHECKS) { - check(__functionAddress); - } - return callPI(mesh.address(), __functionAddress); - } - - /** Array version of: {@link #xrTriangleMeshBeginVertexBufferUpdateFB TriangleMeshBeginVertexBufferUpdateFB} */ - @NativeType("XrResult") - public static int xrTriangleMeshBeginVertexBufferUpdateFB(XrTriangleMeshFB mesh, @NativeType("uint32_t *") int[] outVertexCount) { - long __functionAddress = mesh.getCapabilities().xrTriangleMeshBeginVertexBufferUpdateFB; - if (CHECKS) { - check(__functionAddress); - check(outVertexCount, 1); - } - return callPPI(mesh.address(), outVertexCount, __functionAddress); - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/HTCViveCosmosControllerInteraction.java b/mcxr-play/src/main/java/org/lwjgl/openxr/HTCViveCosmosControllerInteraction.java deleted file mode 100644 index cd6a8d43..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/HTCViveCosmosControllerInteraction.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -/** The HTC_vive_cosmos_controller_interaction extension. */ -public final class HTCViveCosmosControllerInteraction { - - /** The extension specification version. */ - public static final int XR_HTC_vive_cosmos_controller_interaction_SPEC_VERSION = 1; - - /** The extension name. */ - public static final String XR_HTC_VIVE_COSMOS_CONTROLLER_INTERACTION_EXTENSION_NAME = "XR_HTC_vive_cosmos_controller_interaction"; - - private HTCViveCosmosControllerInteraction() {} - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/HTCXViveTrackerInteraction.java b/mcxr-play/src/main/java/org/lwjgl/openxr/HTCXViveTrackerInteraction.java deleted file mode 100644 index f41d44f1..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/HTCXViveTrackerInteraction.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.system.NativeType; - -import java.nio.IntBuffer; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.callPPPI; -import static org.lwjgl.system.MemoryUtil.memAddress; -import static org.lwjgl.system.MemoryUtil.memAddressSafe; - -/** The HTCX_vive_tracker_interaction extension. */ -public class HTCXViveTrackerInteraction { - - /** The extension specification version. */ - public static final int XR_HTCX_vive_tracker_interaction_SPEC_VERSION = 1; - - /** The extension name. */ - public static final String XR_HTCX_VIVE_TRACKER_INTERACTION_EXTENSION_NAME = "XR_HTCX_vive_tracker_interaction"; - - /** - * Extends {@code XrStructureType}. - * - *
Enum values:
- * - *
    - *
  • {@link #XR_TYPE_VIVE_TRACKER_PATHS_HTCX TYPE_VIVE_TRACKER_PATHS_HTCX}
  • - *
  • {@link #XR_TYPE_EVENT_DATA_VIVE_TRACKER_CONNECTED_HTCX TYPE_EVENT_DATA_VIVE_TRACKER_CONNECTED_HTCX}
  • - *
- */ - public static final int - XR_TYPE_VIVE_TRACKER_PATHS_HTCX = 1000103000, - XR_TYPE_EVENT_DATA_VIVE_TRACKER_CONNECTED_HTCX = 1000103001; - - protected HTCXViveTrackerInteraction() { - throw new UnsupportedOperationException(); - } - - // --- [ xrEnumerateViveTrackerPathsHTCX ] --- - - public static int nxrEnumerateViveTrackerPathsHTCX(XrInstance instance, int pathCapacityInput, long pathCountOutput, long paths) { - long __functionAddress = instance.getCapabilities().xrEnumerateViveTrackerPathsHTCX; - if (CHECKS) { - check(__functionAddress); - } - return callPPPI(instance.address(), pathCapacityInput, pathCountOutput, paths, __functionAddress); - } - - @NativeType("XrResult") - public static int xrEnumerateViveTrackerPathsHTCX(XrInstance instance, @NativeType("uint32_t *") IntBuffer pathCountOutput, @Nullable @NativeType("XrViveTrackerPathsHTCX *") XrViveTrackerPathsHTCX.Buffer paths) { - if (CHECKS) { - check(pathCountOutput, 1); - } - return nxrEnumerateViveTrackerPathsHTCX(instance, remainingSafe(paths), memAddress(pathCountOutput), memAddressSafe(paths)); - } - - /** Array version of: {@link #xrEnumerateViveTrackerPathsHTCX EnumerateViveTrackerPathsHTCX} */ -// @NativeType("XrResult") -// public static int xrEnumerateViveTrackerPathsHTCX(XrInstance instance, @NativeType("uint32_t *") int[] pathCountOutput, @Nullable @NativeType("XrViveTrackerPathsHTCX *") XrViveTrackerPathsHTCX.Buffer paths) { -// long __functionAddress = instance.getCapabilities().xrEnumerateViveTrackerPathsHTCX; -// if (CHECKS) { -// check(__functionAddress); -// check(pathCountOutput, 1); -// } -// return callPPPI(instance.address(), remainingSafe(paths), pathCountOutput, memAddressSafe(paths), __functionAddress); -// } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/HUAWEIControllerInteraction.java b/mcxr-play/src/main/java/org/lwjgl/openxr/HUAWEIControllerInteraction.java deleted file mode 100644 index c87e69c8..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/HUAWEIControllerInteraction.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -/** The HUAWEI_controller_interaction extension. */ -public final class HUAWEIControllerInteraction { - - /** The extension specification version. */ - public static final int XR_HUAWEI_controller_interaction_SPEC_VERSION = 1; - - /** The extension name. */ - public static final String XR_HUAWEI_CONTROLLER_INTERACTION_EXTENSION_NAME = "XR_HUAWEI_controller_interaction"; - - private HUAWEIControllerInteraction() {} - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/KHRAndroidSurfaceSwapchain.java b/mcxr-play/src/main/java/org/lwjgl/openxr/KHRAndroidSurfaceSwapchain.java deleted file mode 100644 index d5a1fd5e..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/KHRAndroidSurfaceSwapchain.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.PointerBuffer; -import org.lwjgl.system.NativeType; - -import static org.lwjgl.system.Checks.CHECKS; -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.JNI.callPPPPI; -import static org.lwjgl.system.MemoryUtil.memAddress; - -/** The KHR_android_surface_swapchain extension. */ -public class KHRAndroidSurfaceSwapchain { - - /** The extension specification version. */ - public static final int XR_KHR_android_surface_swapchain_SPEC_VERSION = 4; - - /** The extension name. */ - public static final String XR_KHR_ANDROID_SURFACE_SWAPCHAIN_EXTENSION_NAME = "XR_KHR_android_surface_swapchain"; - - protected KHRAndroidSurfaceSwapchain() { - throw new UnsupportedOperationException(); - } - - // --- [ xrCreateSwapchainAndroidSurfaceKHR ] --- - - public static int nxrCreateSwapchainAndroidSurfaceKHR(XrSession session, long info, long swapchain, long surface) { - long __functionAddress = session.getCapabilities().xrCreateSwapchainAndroidSurfaceKHR; - if (CHECKS) { - check(__functionAddress); - } - return callPPPPI(session.address(), info, swapchain, surface, __functionAddress); - } - - @NativeType("XrResult") - public static int xrCreateSwapchainAndroidSurfaceKHR(XrSession session, @NativeType("XrSwapchainCreateInfo const *") XrSwapchainCreateInfo info, @NativeType("XrSwapchain *") PointerBuffer swapchain, @NativeType("jobject *") PointerBuffer surface) { - if (CHECKS) { - check(swapchain, 1); - check(surface, 1); - } - return nxrCreateSwapchainAndroidSurfaceKHR(session, info.address(), memAddress(swapchain), memAddress(surface)); - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/KHRAndroidThreadSettings.java b/mcxr-play/src/main/java/org/lwjgl/openxr/KHRAndroidThreadSettings.java deleted file mode 100644 index 56626a99..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/KHRAndroidThreadSettings.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.system.NativeType; - -import static org.lwjgl.system.Checks.CHECKS; -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.JNI.callPI; - -/** The KHR_android_thread_settings extension. */ -public class KHRAndroidThreadSettings { - - /** The extension specification version. */ - public static final int XR_KHR_android_thread_settings_SPEC_VERSION = 5; - - /** The extension name. */ - public static final String XR_KHR_ANDROID_THREAD_SETTINGS_EXTENSION_NAME = "XR_KHR_android_thread_settings"; - - /** - * Extends {@code XrResult}. - * - *
Enum values:
- * - *
    - *
  • {@link #XR_ERROR_ANDROID_THREAD_SETTINGS_ID_INVALID_KHR ERROR_ANDROID_THREAD_SETTINGS_ID_INVALID_KHR}
  • - *
  • {@link #XR_ERROR_ANDROID_THREAD_SETTINGS_FAILURE_KHR ERROR_ANDROID_THREAD_SETTINGS_FAILURE_KHR}
  • - *
- */ - public static final int - XR_ERROR_ANDROID_THREAD_SETTINGS_ID_INVALID_KHR = -1000003000, - XR_ERROR_ANDROID_THREAD_SETTINGS_FAILURE_KHR = -1000003001; - - /** - * XrAndroidThreadTypeKHR - * - *
Enum values:
- * - *
    - *
  • {@link #XR_ANDROID_THREAD_TYPE_APPLICATION_MAIN_KHR ANDROID_THREAD_TYPE_APPLICATION_MAIN_KHR}
  • - *
  • {@link #XR_ANDROID_THREAD_TYPE_APPLICATION_WORKER_KHR ANDROID_THREAD_TYPE_APPLICATION_WORKER_KHR}
  • - *
  • {@link #XR_ANDROID_THREAD_TYPE_RENDERER_MAIN_KHR ANDROID_THREAD_TYPE_RENDERER_MAIN_KHR}
  • - *
  • {@link #XR_ANDROID_THREAD_TYPE_RENDERER_WORKER_KHR ANDROID_THREAD_TYPE_RENDERER_WORKER_KHR}
  • - *
- */ - public static final int - XR_ANDROID_THREAD_TYPE_APPLICATION_MAIN_KHR = 1, - XR_ANDROID_THREAD_TYPE_APPLICATION_WORKER_KHR = 2, - XR_ANDROID_THREAD_TYPE_RENDERER_MAIN_KHR = 3, - XR_ANDROID_THREAD_TYPE_RENDERER_WORKER_KHR = 4; - - protected KHRAndroidThreadSettings() { - throw new UnsupportedOperationException(); - } - - // --- [ xrSetAndroidApplicationThreadKHR ] --- - - @NativeType("XrResult") - public static int xrSetAndroidApplicationThreadKHR(XrSession session, @NativeType("XrAndroidThreadTypeKHR") int threadType, @NativeType("uint32_t") int threadId) { - long __functionAddress = session.getCapabilities().xrSetAndroidApplicationThreadKHR; - if (CHECKS) { - check(__functionAddress); - } - return callPI(session.address(), threadType, threadId, __functionAddress); - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/KHRBindingModification.java b/mcxr-play/src/main/java/org/lwjgl/openxr/KHRBindingModification.java deleted file mode 100644 index a6be8c69..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/KHRBindingModification.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -/** The KHR_binding_modification extension. */ -public final class KHRBindingModification { - - /** The extension specification version. */ - public static final int XR_KHR_binding_modification_SPEC_VERSION = 1; - - /** The extension name. */ - public static final String XR_KHR_BINDING_MODIFICATION_EXTENSION_NAME = "XR_KHR_binding_modification"; - - /** Extends {@code XrStructureType}. */ - public static final int XR_TYPE_BINDING_MODIFICATIONS_KHR = 1000120000; - - private KHRBindingModification() {} - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/KHRCompositionLayerColorScaleBias.java b/mcxr-play/src/main/java/org/lwjgl/openxr/KHRCompositionLayerColorScaleBias.java deleted file mode 100644 index ec9b4ae0..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/KHRCompositionLayerColorScaleBias.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -/** The KHR_composition_layer_color_scale_bias extension. */ -public final class KHRCompositionLayerColorScaleBias { - - /** The extension specification version. */ - public static final int XR_KHR_composition_layer_color_scale_bias_SPEC_VERSION = 5; - - /** The extension name. */ - public static final String XR_KHR_COMPOSITION_LAYER_COLOR_SCALE_BIAS_EXTENSION_NAME = "XR_KHR_composition_layer_color_scale_bias"; - - /** Extends {@code XrStructureType}. */ - public static final int XR_TYPE_COMPOSITION_LAYER_COLOR_SCALE_BIAS_KHR = 1000034000; - - private KHRCompositionLayerColorScaleBias() {} - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/KHRCompositionLayerCube.java b/mcxr-play/src/main/java/org/lwjgl/openxr/KHRCompositionLayerCube.java deleted file mode 100644 index 455eedaa..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/KHRCompositionLayerCube.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -/** The KHR_composition_layer_cube extension. */ -public final class KHRCompositionLayerCube { - - /** The extension specification version. */ - public static final int XR_KHR_composition_layer_cube_SPEC_VERSION = 8; - - /** The extension name. */ - public static final String XR_KHR_COMPOSITION_LAYER_CUBE_EXTENSION_NAME = "XR_KHR_composition_layer_cube"; - - /** Extends {@code XrStructureType}. */ - public static final int XR_TYPE_COMPOSITION_LAYER_CUBE_KHR = 1000006000; - - private KHRCompositionLayerCube() {} - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/KHRCompositionLayerCylinder.java b/mcxr-play/src/main/java/org/lwjgl/openxr/KHRCompositionLayerCylinder.java deleted file mode 100644 index 6c8518ce..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/KHRCompositionLayerCylinder.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -/** The KHR_composition_layer_cylinder extension. */ -public final class KHRCompositionLayerCylinder { - - /** The extension specification version. */ - public static final int XR_KHR_composition_layer_cylinder_SPEC_VERSION = 4; - - /** The extension name. */ - public static final String XR_KHR_COMPOSITION_LAYER_CYLINDER_EXTENSION_NAME = "XR_KHR_composition_layer_cylinder"; - - /** Extends {@code XrStructureType}. */ - public static final int XR_TYPE_COMPOSITION_LAYER_CYLINDER_KHR = 1000017000; - - private KHRCompositionLayerCylinder() {} - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/KHRCompositionLayerDepth.java b/mcxr-play/src/main/java/org/lwjgl/openxr/KHRCompositionLayerDepth.java deleted file mode 100644 index 8c9b7d1d..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/KHRCompositionLayerDepth.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -/** The KHR_composition_layer_depth extension. */ -public final class KHRCompositionLayerDepth { - - /** The extension specification version. */ - public static final int XR_KHR_composition_layer_depth_SPEC_VERSION = 5; - - /** The extension name. */ - public static final String XR_KHR_COMPOSITION_LAYER_DEPTH_EXTENSION_NAME = "XR_KHR_composition_layer_depth"; - - /** Extends {@code XrStructureType}. */ - public static final int XR_TYPE_COMPOSITION_LAYER_DEPTH_INFO_KHR = 1000010000; - - private KHRCompositionLayerDepth() {} - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/KHRCompositionLayerEquirect.java b/mcxr-play/src/main/java/org/lwjgl/openxr/KHRCompositionLayerEquirect.java deleted file mode 100644 index bb13e3ee..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/KHRCompositionLayerEquirect.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -/** The KHR_composition_layer_equirect extension. */ -public final class KHRCompositionLayerEquirect { - - /** The extension specification version. */ - public static final int XR_KHR_composition_layer_equirect_SPEC_VERSION = 3; - - /** The extension name. */ - public static final String XR_KHR_COMPOSITION_LAYER_EQUIRECT_EXTENSION_NAME = "XR_KHR_composition_layer_equirect"; - - /** Extends {@code XrStructureType}. */ - public static final int XR_TYPE_COMPOSITION_LAYER_EQUIRECT_KHR = 1000018000; - - private KHRCompositionLayerEquirect() {} - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/KHRCompositionLayerEquirect2.java b/mcxr-play/src/main/java/org/lwjgl/openxr/KHRCompositionLayerEquirect2.java deleted file mode 100644 index 9d5555bb..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/KHRCompositionLayerEquirect2.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -/** The KHR_composition_layer_equirect2 extension. */ -public final class KHRCompositionLayerEquirect2 { - - /** The extension specification version. */ - public static final int XR_KHR_composition_layer_equirect2_SPEC_VERSION = 1; - - /** The extension name. */ - public static final String XR_KHR_COMPOSITION_LAYER_EQUIRECT2_EXTENSION_NAME = "XR_KHR_composition_layer_equirect2"; - - /** Extends {@code XrStructureType}. */ - public static final int XR_TYPE_COMPOSITION_LAYER_EQUIRECT2_KHR = 1000091000; - - private KHRCompositionLayerEquirect2() {} - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/KHRConvertTimespecTime.java b/mcxr-play/src/main/java/org/lwjgl/openxr/KHRConvertTimespecTime.java deleted file mode 100644 index 8ca254f3..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/KHRConvertTimespecTime.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.system.NativeType; - -import java.nio.LongBuffer; - -import static org.lwjgl.system.Checks.CHECKS; -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.JNI.callPJPI; -import static org.lwjgl.system.JNI.callPPPI; -import static org.lwjgl.system.MemoryUtil.memAddress; - -/** The KHR_convert_timespec_time extension. */ -public class KHRConvertTimespecTime { - - /** The extension specification version. */ - public static final int XR_KHR_convert_timespec_time_SPEC_VERSION = 1; - - /** The extension name. */ - public static final String XR_KHR_CONVERT_TIMESPEC_TIME_EXTENSION_NAME = "XR_KHR_convert_timespec_time"; - - protected KHRConvertTimespecTime() { - throw new UnsupportedOperationException(); - } - - // --- [ xrConvertTimespecTimeToTimeKHR ] --- - - public static int nxrConvertTimespecTimeToTimeKHR(XrInstance instance, long timespecTime, long time) { - long __functionAddress = instance.getCapabilities().xrConvertTimespecTimeToTimeKHR; - if (CHECKS) { - check(__functionAddress); - } - return callPPPI(instance.address(), timespecTime, time, __functionAddress); - } - -// @NativeType("XrResult") -// public static int xrConvertTimespecTimeToTimeKHR(XrInstance instance, @NativeType("Timespec *") Timespec.Buffer timespecTime, @NativeType("XrTime *") LongBuffer time) { -// if (CHECKS) { -// check(timespecTime, 1); -// check(time, 1); -// } -// return nxrConvertTimespecTimeToTimeKHR(instance, timespecTime.address(), memAddress(time)); -// } -// -// // --- [ xrConvertTimeToTimespecTimeKHR ] --- -// -// public static int nxrConvertTimeToTimespecTimeKHR(XrInstance instance, long time, long timespecTime) { -// long __functionAddress = instance.getCapabilities().xrConvertTimeToTimespecTimeKHR; -// if (CHECKS) { -// check(__functionAddress); -// } -// return callPJPI(instance.address(), time, timespecTime, __functionAddress); -// } -// -// @NativeType("XrResult") -// public static int xrConvertTimeToTimespecTimeKHR(XrInstance instance, @NativeType("XrTime") long time, @NativeType("Timespec *") Timespec.Buffer timespecTime) { -// if (CHECKS) { -// check(timespecTime, 1); -// } -// return nxrConvertTimeToTimespecTimeKHR(instance, time, timespecTime.address()); -// } -// -// /** Array version of: {@link #xrConvertTimespecTimeToTimeKHR ConvertTimespecTimeToTimeKHR} */ -// @NativeType("XrResult") -// public static int xrConvertTimespecTimeToTimeKHR(XrInstance instance, @NativeType("Timespec *") Timespec.Buffer timespecTime, @NativeType("XrTime *") long[] time) { -// long __functionAddress = instance.getCapabilities().xrConvertTimespecTimeToTimeKHR; -// if (CHECKS) { -// check(__functionAddress); -// check(timespecTime, 1); -// check(time, 1); -// } -// return callPPPI(instance.address(), timespecTime.address(), time, __functionAddress); -// } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/KHRLoaderInit.java b/mcxr-play/src/main/java/org/lwjgl/openxr/KHRLoaderInit.java deleted file mode 100644 index 6d1fc9d3..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/KHRLoaderInit.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.system.NativeType; - -import static org.lwjgl.system.Checks.CHECKS; -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.JNI.callPI; - -/** The KHR_loader_init extension. */ -public class KHRLoaderInit { - - /** The extension specification version. */ - public static final int XR_KHR_loader_init_SPEC_VERSION = 1; - - /** The extension name. */ - public static final String XR_KHR_LOADER_INIT_EXTENSION_NAME = "XR_KHR_loader_init"; - - protected KHRLoaderInit() { - throw new UnsupportedOperationException(); - } - - // --- [ xrInitializeLoaderKHR ] --- - - public static int nxrInitializeLoaderKHR(long loaderInitInfo) { - long __functionAddress = XR.getGlobalCommands().xrInitializeLoaderKHR; - if (CHECKS) { - check(__functionAddress); - } - return callPI(loaderInitInfo, __functionAddress); - } - - @NativeType("XrResult") - public static int xrInitializeLoaderKHR(@NativeType("XrLoaderInitInfoBaseHeaderKHR const *") XrLoaderInitInfoBaseHeaderKHR loaderInitInfo) { - return nxrInitializeLoaderKHR(loaderInitInfo.address()); - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/KHRLoaderInitAndroid.java b/mcxr-play/src/main/java/org/lwjgl/openxr/KHRLoaderInitAndroid.java deleted file mode 100644 index 3e211219..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/KHRLoaderInitAndroid.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -/** The KHR_loader_init_android extension. */ -public final class KHRLoaderInitAndroid { - - /** The extension specification version. */ - public static final int XR_KHR_loader_init_android_SPEC_VERSION = 1; - - /** The extension name. */ - public static final String XR_KHR_LOADER_INIT_ANDROID_EXTENSION_NAME = "XR_KHR_loader_init_android"; - - /** Extends {@code XrStructureType}. */ - public static final int XR_TYPE_LOADER_INIT_INFO_ANDROID_KHR = 1000089000; - - private KHRLoaderInitAndroid() {} - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/KHROpenglEnable.java b/mcxr-play/src/main/java/org/lwjgl/openxr/KHROpenglEnable.java deleted file mode 100644 index f7ec4360..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/KHROpenglEnable.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.system.NativeType; - -import static org.lwjgl.system.Checks.CHECKS; -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.JNI.callPJPI; - -/** The KHR_opengl_enable extension. */ -public class KHROpenglEnable { - - /** The extension specification version. */ - public static final int XR_KHR_opengl_enable_SPEC_VERSION = 10; - - /** The extension name. */ - public static final String XR_KHR_OPENGL_ENABLE_EXTENSION_NAME = "XR_KHR_opengl_enable"; - - /** - * Extends {@code XrStructureType}. - * - *
Enum values:
- * - *
    - *
  • {@link #XR_TYPE_GRAPHICS_BINDING_OPENGL_WIN32_KHR TYPE_GRAPHICS_BINDING_OPENGL_WIN32_KHR}
  • - *
  • {@link #XR_TYPE_GRAPHICS_BINDING_OPENGL_XLIB_KHR TYPE_GRAPHICS_BINDING_OPENGL_XLIB_KHR}
  • - *
  • {@link #XR_TYPE_GRAPHICS_BINDING_OPENGL_XCB_KHR TYPE_GRAPHICS_BINDING_OPENGL_XCB_KHR}
  • - *
  • {@link #XR_TYPE_GRAPHICS_BINDING_OPENGL_WAYLAND_KHR TYPE_GRAPHICS_BINDING_OPENGL_WAYLAND_KHR}
  • - *
  • {@link #XR_TYPE_SWAPCHAIN_IMAGE_OPENGL_KHR TYPE_SWAPCHAIN_IMAGE_OPENGL_KHR}
  • - *
  • {@link #XR_TYPE_GRAPHICS_REQUIREMENTS_OPENGL_KHR TYPE_GRAPHICS_REQUIREMENTS_OPENGL_KHR}
  • - *
- */ - public static final int - XR_TYPE_GRAPHICS_BINDING_OPENGL_WIN32_KHR = 1000023000, - XR_TYPE_GRAPHICS_BINDING_OPENGL_XLIB_KHR = 1000023001, - XR_TYPE_GRAPHICS_BINDING_OPENGL_XCB_KHR = 1000023002, - XR_TYPE_GRAPHICS_BINDING_OPENGL_WAYLAND_KHR = 1000023003, - XR_TYPE_SWAPCHAIN_IMAGE_OPENGL_KHR = 1000023004, - XR_TYPE_GRAPHICS_REQUIREMENTS_OPENGL_KHR = 1000023005; - - protected KHROpenglEnable() { - throw new UnsupportedOperationException(); - } - - // --- [ xrGetOpenGLGraphicsRequirementsKHR ] --- - - public static int nxrGetOpenGLGraphicsRequirementsKHR(XrInstance instance, long systemId, long graphicsRequirements) { - long __functionAddress = instance.getCapabilities().xrGetOpenGLGraphicsRequirementsKHR; - if (CHECKS) { - check(__functionAddress); - } - return callPJPI(instance.address(), systemId, graphicsRequirements, __functionAddress); - } - - @NativeType("XrResult") - public static int xrGetOpenGLGraphicsRequirementsKHR(XrInstance instance, @NativeType("XrSystemId") long systemId, @NativeType("XrGraphicsRequirementsOpenGLKHR *") XrGraphicsRequirementsOpenGLKHR graphicsRequirements) { - return nxrGetOpenGLGraphicsRequirementsKHR(instance, systemId, graphicsRequirements.address()); - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/KHROpenglEsEnable.java b/mcxr-play/src/main/java/org/lwjgl/openxr/KHROpenglEsEnable.java deleted file mode 100644 index 7d466865..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/KHROpenglEsEnable.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.system.NativeType; - -import static org.lwjgl.system.Checks.CHECKS; -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.JNI.callPJPI; - -/** The KHR_opengl_es_enable extension. */ -public class KHROpenglEsEnable { - - /** The extension specification version. */ - public static final int XR_KHR_opengl_es_enable_SPEC_VERSION = 8; - - /** The extension name. */ - public static final String XR_KHR_OPENGL_ES_ENABLE_EXTENSION_NAME = "XR_KHR_opengl_es_enable"; - - /** - * Extends {@code XrStructureType}. - * - *
Enum values:
- * - *
    - *
  • {@link #XR_TYPE_GRAPHICS_BINDING_OPENGL_ES_ANDROID_KHR TYPE_GRAPHICS_BINDING_OPENGL_ES_ANDROID_KHR}
  • - *
  • {@link #XR_TYPE_SWAPCHAIN_IMAGE_OPENGL_ES_KHR TYPE_SWAPCHAIN_IMAGE_OPENGL_ES_KHR}
  • - *
  • {@link #XR_TYPE_GRAPHICS_REQUIREMENTS_OPENGL_ES_KHR TYPE_GRAPHICS_REQUIREMENTS_OPENGL_ES_KHR}
  • - *
- */ - public static final int - XR_TYPE_GRAPHICS_BINDING_OPENGL_ES_ANDROID_KHR = 1000024001, - XR_TYPE_SWAPCHAIN_IMAGE_OPENGL_ES_KHR = 1000024002, - XR_TYPE_GRAPHICS_REQUIREMENTS_OPENGL_ES_KHR = 1000024003; - - protected KHROpenglEsEnable() { - throw new UnsupportedOperationException(); - } - - // --- [ xrGetOpenGLESGraphicsRequirementsKHR ] --- - - public static int nxrGetOpenGLESGraphicsRequirementsKHR(XrInstance instance, long systemId, long graphicsRequirements) { - long __functionAddress = instance.getCapabilities().xrGetOpenGLESGraphicsRequirementsKHR; - if (CHECKS) { - check(__functionAddress); - } - return callPJPI(instance.address(), systemId, graphicsRequirements, __functionAddress); - } - - @NativeType("XrResult") - public static int xrGetOpenGLESGraphicsRequirementsKHR(XrInstance instance, @NativeType("XrSystemId") long systemId, @NativeType("XrGraphicsRequirementsOpenGLESKHR *") XrGraphicsRequirementsOpenGLESKHR graphicsRequirements) { - return nxrGetOpenGLESGraphicsRequirementsKHR(instance, systemId, graphicsRequirements.address()); - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/KHRSwapchainUsageInputAttachmentBit.java b/mcxr-play/src/main/java/org/lwjgl/openxr/KHRSwapchainUsageInputAttachmentBit.java deleted file mode 100644 index 3ad8d7ed..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/KHRSwapchainUsageInputAttachmentBit.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -/** The KHR_swapchain_usage_input_attachment_bit extension. */ -public final class KHRSwapchainUsageInputAttachmentBit { - - /** The extension specification version. */ - public static final int XR_KHR_swapchain_usage_input_attachment_bit_SPEC_VERSION = 3; - - /** The extension name. */ - public static final String XR_KHR_SWAPCHAIN_USAGE_INPUT_ATTACHMENT_BIT_EXTENSION_NAME = "XR_KHR_swapchain_usage_input_attachment_bit"; - - /** Extends {@code XrSwapchainUsageFlagBits}. */ - public static final int XR_SWAPCHAIN_USAGE_INPUT_ATTACHMENT_BIT_KHR = 0x80; - - private KHRSwapchainUsageInputAttachmentBit() {} - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/KHRVisibilityMask.java b/mcxr-play/src/main/java/org/lwjgl/openxr/KHRVisibilityMask.java deleted file mode 100644 index 011460b2..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/KHRVisibilityMask.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.system.NativeType; - -import static org.lwjgl.system.Checks.CHECKS; -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.JNI.callPPI; - -/** The KHR_visibility_mask extension. */ -public class KHRVisibilityMask { - - /** The extension specification version. */ - public static final int XR_KHR_visibility_mask_SPEC_VERSION = 2; - - /** The extension name. */ - public static final String XR_KHR_VISIBILITY_MASK_EXTENSION_NAME = "XR_KHR_visibility_mask"; - - /** - * Extends {@code XrStructureType}. - * - *
Enum values:
- * - *
    - *
  • {@link #XR_TYPE_VISIBILITY_MASK_KHR TYPE_VISIBILITY_MASK_KHR}
  • - *
  • {@link #XR_TYPE_EVENT_DATA_VISIBILITY_MASK_CHANGED_KHR TYPE_EVENT_DATA_VISIBILITY_MASK_CHANGED_KHR}
  • - *
- */ - public static final int - XR_TYPE_VISIBILITY_MASK_KHR = 1000031000, - XR_TYPE_EVENT_DATA_VISIBILITY_MASK_CHANGED_KHR = 1000031001; - - /** - * XrVisibilityMaskTypeKHR - * - *
Enum values:
- * - *
    - *
  • {@link #XR_VISIBILITY_MASK_TYPE_HIDDEN_TRIANGLE_MESH_KHR VISIBILITY_MASK_TYPE_HIDDEN_TRIANGLE_MESH_KHR}
  • - *
  • {@link #XR_VISIBILITY_MASK_TYPE_VISIBLE_TRIANGLE_MESH_KHR VISIBILITY_MASK_TYPE_VISIBLE_TRIANGLE_MESH_KHR}
  • - *
  • {@link #XR_VISIBILITY_MASK_TYPE_LINE_LOOP_KHR VISIBILITY_MASK_TYPE_LINE_LOOP_KHR}
  • - *
- */ - public static final int - XR_VISIBILITY_MASK_TYPE_HIDDEN_TRIANGLE_MESH_KHR = 1, - XR_VISIBILITY_MASK_TYPE_VISIBLE_TRIANGLE_MESH_KHR = 2, - XR_VISIBILITY_MASK_TYPE_LINE_LOOP_KHR = 3; - - protected KHRVisibilityMask() { - throw new UnsupportedOperationException(); - } - - // --- [ xrGetVisibilityMaskKHR ] --- - - public static int nxrGetVisibilityMaskKHR(XrSession session, int viewConfigurationType, int viewIndex, int visibilityMaskType, long visibilityMask) { - long __functionAddress = session.getCapabilities().xrGetVisibilityMaskKHR; - if (CHECKS) { - check(__functionAddress); - } - return callPPI(session.address(), viewConfigurationType, viewIndex, visibilityMaskType, visibilityMask, __functionAddress); - } - - @NativeType("XrResult") - public static int xrGetVisibilityMaskKHR(XrSession session, @NativeType("XrViewConfigurationType") int viewConfigurationType, @NativeType("uint32_t") int viewIndex, @NativeType("XrVisibilityMaskTypeKHR") int visibilityMaskType, @NativeType("XrVisibilityMaskKHR *") XrVisibilityMaskKHR visibilityMask) { - return nxrGetVisibilityMaskKHR(session, viewConfigurationType, viewIndex, visibilityMaskType, visibilityMask.address()); - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/KHRWin32ConvertPerformanceCounterTime.java b/mcxr-play/src/main/java/org/lwjgl/openxr/KHRWin32ConvertPerformanceCounterTime.java deleted file mode 100644 index bd17aff8..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/KHRWin32ConvertPerformanceCounterTime.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.system.NativeType; - -import java.nio.LongBuffer; - -import static org.lwjgl.system.Checks.CHECKS; -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.JNI.callPJPI; -import static org.lwjgl.system.JNI.callPPPI; -import static org.lwjgl.system.MemoryUtil.memAddress; - -/** The KHR_win32_convert_performance_counter_time extension. */ -public class KHRWin32ConvertPerformanceCounterTime { - - /** The extension specification version. */ - public static final int XR_KHR_win32_convert_performance_counter_time_SPEC_VERSION = 1; - - /** The extension name. */ - public static final String XR_KHR_WIN32_CONVERT_PERFORMANCE_COUNTER_TIME_EXTENSION_NAME = "XR_KHR_win32_convert_performance_counter_time"; - - protected KHRWin32ConvertPerformanceCounterTime() { - throw new UnsupportedOperationException(); - } - - // --- [ xrConvertWin32PerformanceCounterToTimeKHR ] --- - - public static int nxrConvertWin32PerformanceCounterToTimeKHR(XrInstance instance, long performanceCounter, long time) { - long __functionAddress = instance.getCapabilities().xrConvertWin32PerformanceCounterToTimeKHR; - if (CHECKS) { - check(__functionAddress); - } - return callPPPI(instance.address(), performanceCounter, time, __functionAddress); - } - - @NativeType("XrResult") - public static int xrConvertWin32PerformanceCounterToTimeKHR(XrInstance instance, @NativeType("LARGE_INTEGER const *") LongBuffer performanceCounter, @NativeType("XrTime *") LongBuffer time) { - if (CHECKS) { - check(performanceCounter, 1); - check(time, 1); - } - return nxrConvertWin32PerformanceCounterToTimeKHR(instance, memAddress(performanceCounter), memAddress(time)); - } - - // --- [ xrConvertTimeToWin32PerformanceCounterKHR ] --- - - public static int nxrConvertTimeToWin32PerformanceCounterKHR(XrInstance instance, long time, long performanceCounter) { - long __functionAddress = instance.getCapabilities().xrConvertTimeToWin32PerformanceCounterKHR; - if (CHECKS) { - check(__functionAddress); - } - return callPJPI(instance.address(), time, performanceCounter, __functionAddress); - } - - @NativeType("XrResult") - public static int xrConvertTimeToWin32PerformanceCounterKHR(XrInstance instance, @NativeType("XrTime") long time, @NativeType("LARGE_INTEGER *") LongBuffer performanceCounter) { - if (CHECKS) { - check(performanceCounter, 1); - } - return nxrConvertTimeToWin32PerformanceCounterKHR(instance, time, memAddress(performanceCounter)); - } - - /** Array version of: {@link #xrConvertWin32PerformanceCounterToTimeKHR ConvertWin32PerformanceCounterToTimeKHR} */ - @NativeType("XrResult") - public static int xrConvertWin32PerformanceCounterToTimeKHR(XrInstance instance, @NativeType("LARGE_INTEGER const *") long[] performanceCounter, @NativeType("XrTime *") long[] time) { - long __functionAddress = instance.getCapabilities().xrConvertWin32PerformanceCounterToTimeKHR; - if (CHECKS) { - check(__functionAddress); - check(performanceCounter, 1); - check(time, 1); - } - return callPPPI(instance.address(), performanceCounter, time, __functionAddress); - } - - /** Array version of: {@link #xrConvertTimeToWin32PerformanceCounterKHR ConvertTimeToWin32PerformanceCounterKHR} */ -// @NativeType("XrResult") -// public static int xrConvertTimeToWin32PerformanceCounterKHR(XrInstance instance, @NativeType("XrTime") long time, @NativeType("LARGE_INTEGER *") long[] performanceCounter) { -// long __functionAddress = instance.getCapabilities().xrConvertTimeToWin32PerformanceCounterKHR; -// if (CHECKS) { -// check(__functionAddress); -// check(performanceCounter, 1); -// } -// return callPJPI(instance.address(), time, performanceCounter, __functionAddress); -// } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/LWJGLCompat.java b/mcxr-play/src/main/java/org/lwjgl/openxr/LWJGLCompat.java deleted file mode 100644 index adb56a8f..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/LWJGLCompat.java +++ /dev/null @@ -1,51 +0,0 @@ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.system.FunctionProvider; -import org.lwjgl.system.dyncall.DynCall; - -import static org.lwjgl.system.APIUtil.apiLog; -import static org.lwjgl.system.MemoryUtil.NULL; - -/** - * Minecraft uses an old version of lwjgl so certain functions have had to be copied backwards - */ -public class LWJGLCompat { - - public static boolean reportMissing(String api, String extension) { - apiLog("[" + api + "] " + extension + " was reported as available but an entry point is missing."); - return false; - } - - public static boolean checkFunctions(FunctionProvider provider, long[] caps, int[] indices, String... functions) { - boolean available = true; - for (int i = 0; i < indices.length; i++) { - int index = indices[i]; - if (index < 0 || caps[index] != NULL) { - continue; - } - long address = provider.getFunctionAddress(functions[i]); - if (address == NULL) { - available = false; - continue; - } - caps[index] = address; - } - return available; - } - - /** - * We have to create custom methods to call certain native functions which are not in {@link org.lwjgl.system.JNI} - */ - private static final long vm = DynCall.dcNewCallVM(4096); - - public static int callPPJPI(long param0, long param1, long param2, long param3, long __functionAddress) { - DynCall.dcMode(vm, DynCall.DC_CALL_C_DEFAULT); - DynCall.dcReset(vm); - DynCall.dcArgPointer(vm, param0); - DynCall.dcArgPointer(vm, param1); - DynCall.dcArgLongLong(vm, param2); - DynCall.dcArgPointer(vm, param3); - return DynCall.dcCallInt(vm, __functionAddress); - } -} diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/MNDHeadless.java b/mcxr-play/src/main/java/org/lwjgl/openxr/MNDHeadless.java deleted file mode 100644 index e1d52deb..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/MNDHeadless.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -/** The MND_headless extension. */ -public final class MNDHeadless { - - /** The extension specification version. */ - public static final int XR_MND_headless_SPEC_VERSION = 2; - - /** The extension name. */ - public static final String XR_MND_HEADLESS_EXTENSION_NAME = "XR_MND_headless"; - - private MNDHeadless() {} - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/MNDSwapchainUsageInputAttachmentBit.java b/mcxr-play/src/main/java/org/lwjgl/openxr/MNDSwapchainUsageInputAttachmentBit.java deleted file mode 100644 index 1c34e7f1..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/MNDSwapchainUsageInputAttachmentBit.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -/** The MND_swapchain_usage_input_attachment_bit extension. */ -public final class MNDSwapchainUsageInputAttachmentBit { - - /** The extension specification version. */ - public static final int XR_MND_swapchain_usage_input_attachment_bit_SPEC_VERSION = 2; - - /** The extension name. */ - public static final String XR_MND_SWAPCHAIN_USAGE_INPUT_ATTACHMENT_BIT_EXTENSION_NAME = "XR_MND_swapchain_usage_input_attachment_bit"; - - /** Extends {@code XrSwapchainUsageFlagBits}. */ - public static final int XR_SWAPCHAIN_USAGE_INPUT_ATTACHMENT_BIT_MND = 0x80; - - private MNDSwapchainUsageInputAttachmentBit() {} - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/MNDXEglEnable.java b/mcxr-play/src/main/java/org/lwjgl/openxr/MNDXEglEnable.java deleted file mode 100644 index 9c5e3bdf..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/MNDXEglEnable.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -/** The MNDX_egl_enable extension. */ -public final class MNDXEglEnable { - - /** The extension specification version. */ - public static final int XR_MNDX_egl_enable_SPEC_VERSION = 1; - - /** The extension name. */ - public static final String XR_MNDX_EGL_ENABLE_EXTENSION_NAME = "XR_MNDX_egl_enable"; - - /** Extends {@code XrStructureType}. */ - public static final int XR_TYPE_GRAPHICS_BINDING_EGL_MNDX = 1000048004; - - private MNDXEglEnable() {} - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/MSFTCompositionLayerReprojection.java b/mcxr-play/src/main/java/org/lwjgl/openxr/MSFTCompositionLayerReprojection.java deleted file mode 100644 index bbda28de..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/MSFTCompositionLayerReprojection.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.system.NativeType; - -import java.nio.IntBuffer; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.callPJPPI; -import static org.lwjgl.system.MemoryUtil.memAddress; -import static org.lwjgl.system.MemoryUtil.memAddressSafe; - -/** The MSFT_composition_layer_reprojection extension. */ -public class MSFTCompositionLayerReprojection { - - /** The extension specification version. */ - public static final int XR_MSFT_composition_layer_reprojection_SPEC_VERSION = 1; - - /** The extension name. */ - public static final String XR_MSFT_COMPOSITION_LAYER_REPROJECTION_EXTENSION_NAME = "XR_MSFT_composition_layer_reprojection"; - - /** - * Extends {@code XrStructureType}. - * - *
Enum values:
- * - *
    - *
  • {@link #XR_TYPE_COMPOSITION_LAYER_REPROJECTION_INFO_MSFT TYPE_COMPOSITION_LAYER_REPROJECTION_INFO_MSFT}
  • - *
  • {@link #XR_TYPE_COMPOSITION_LAYER_REPROJECTION_PLANE_OVERRIDE_MSFT TYPE_COMPOSITION_LAYER_REPROJECTION_PLANE_OVERRIDE_MSFT}
  • - *
- */ - public static final int - XR_TYPE_COMPOSITION_LAYER_REPROJECTION_INFO_MSFT = 1000066000, - XR_TYPE_COMPOSITION_LAYER_REPROJECTION_PLANE_OVERRIDE_MSFT = 1000066001; - - /** Extends {@code XrResult}. */ - public static final int XR_ERROR_REPROJECTION_MODE_UNSUPPORTED_MSFT = -1000066000; - - /** - * XrReprojectionModeMSFT - * - *
Enum values:
- * - *
    - *
  • {@link #XR_REPROJECTION_MODE_DEPTH_MSFT REPROJECTION_MODE_DEPTH_MSFT}
  • - *
  • {@link #XR_REPROJECTION_MODE_PLANAR_FROM_DEPTH_MSFT REPROJECTION_MODE_PLANAR_FROM_DEPTH_MSFT}
  • - *
  • {@link #XR_REPROJECTION_MODE_PLANAR_MANUAL_MSFT REPROJECTION_MODE_PLANAR_MANUAL_MSFT}
  • - *
  • {@link #XR_REPROJECTION_MODE_ORIENTATION_ONLY_MSFT REPROJECTION_MODE_ORIENTATION_ONLY_MSFT}
  • - *
- */ - public static final int - XR_REPROJECTION_MODE_DEPTH_MSFT = 1, - XR_REPROJECTION_MODE_PLANAR_FROM_DEPTH_MSFT = 2, - XR_REPROJECTION_MODE_PLANAR_MANUAL_MSFT = 3, - XR_REPROJECTION_MODE_ORIENTATION_ONLY_MSFT = 4; - - protected MSFTCompositionLayerReprojection() { - throw new UnsupportedOperationException(); - } - - // --- [ xrEnumerateReprojectionModesMSFT ] --- - - public static int nxrEnumerateReprojectionModesMSFT(XrInstance instance, long systemId, int viewConfigurationType, int modeCapacityInput, long modeCountOutput, long modes) { - long __functionAddress = instance.getCapabilities().xrEnumerateReprojectionModesMSFT; - if (CHECKS) { - check(__functionAddress); - } - return callPJPPI(instance.address(), systemId, viewConfigurationType, modeCapacityInput, modeCountOutput, modes, __functionAddress); - } - - @NativeType("XrResult") - public static int xrEnumerateReprojectionModesMSFT(XrInstance instance, @NativeType("XrSystemId") long systemId, @NativeType("XrViewConfigurationType") int viewConfigurationType, @NativeType("uint32_t *") IntBuffer modeCountOutput, @Nullable @NativeType("XrReprojectionModeMSFT *") IntBuffer modes) { - if (CHECKS) { - check(modeCountOutput, 1); - } - return nxrEnumerateReprojectionModesMSFT(instance, systemId, viewConfigurationType, remainingSafe(modes), memAddress(modeCountOutput), memAddressSafe(modes)); - } - - /** Array version of: {@link #xrEnumerateReprojectionModesMSFT EnumerateReprojectionModesMSFT} */ -// @NativeType("XrResult") -// public static int xrEnumerateReprojectionModesMSFT(XrInstance instance, @NativeType("XrSystemId") long systemId, @NativeType("XrViewConfigurationType") int viewConfigurationType, @NativeType("uint32_t *") int[] modeCountOutput, @Nullable @NativeType("XrReprojectionModeMSFT *") int[] modes) { -// long __functionAddress = instance.getCapabilities().xrEnumerateReprojectionModesMSFT; -// if (CHECKS) { -// check(__functionAddress); -// check(modeCountOutput, 1); -// } -// return callPJPPI(instance.address(), systemId, viewConfigurationType, lengthSafe(modes), modeCountOutput, modes, __functionAddress); -// } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/MSFTControllerModel.java b/mcxr-play/src/main/java/org/lwjgl/openxr/MSFTControllerModel.java deleted file mode 100644 index 5a590bf2..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/MSFTControllerModel.java +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.system.NativeType; - -import java.nio.ByteBuffer; -import java.nio.IntBuffer; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.callPJPI; -import static org.lwjgl.system.JNI.callPJPPI; -import static org.lwjgl.system.MemoryUtil.memAddress; -import static org.lwjgl.system.MemoryUtil.memAddressSafe; - -/** The MSFT_controller_model extension. */ -public class MSFTControllerModel { - - /** The extension specification version. */ - public static final int XR_MSFT_controller_model_SPEC_VERSION = 2; - - /** The extension name. */ - public static final String XR_MSFT_CONTROLLER_MODEL_EXTENSION_NAME = "XR_MSFT_controller_model"; - - /** XR_MAX_CONTROLLER_MODEL_NODE_NAME_SIZE_MSFT */ - public static final int XR_MAX_CONTROLLER_MODEL_NODE_NAME_SIZE_MSFT = 64; - - /** - * Extends {@code XrStructureType}. - * - *
Enum values:
- * - *
    - *
  • {@link #XR_TYPE_CONTROLLER_MODEL_KEY_STATE_MSFT TYPE_CONTROLLER_MODEL_KEY_STATE_MSFT}
  • - *
  • {@link #XR_TYPE_CONTROLLER_MODEL_NODE_PROPERTIES_MSFT TYPE_CONTROLLER_MODEL_NODE_PROPERTIES_MSFT}
  • - *
  • {@link #XR_TYPE_CONTROLLER_MODEL_PROPERTIES_MSFT TYPE_CONTROLLER_MODEL_PROPERTIES_MSFT}
  • - *
  • {@link #XR_TYPE_CONTROLLER_MODEL_NODE_STATE_MSFT TYPE_CONTROLLER_MODEL_NODE_STATE_MSFT}
  • - *
  • {@link #XR_TYPE_CONTROLLER_MODEL_STATE_MSFT TYPE_CONTROLLER_MODEL_STATE_MSFT}
  • - *
- */ - public static final int - XR_TYPE_CONTROLLER_MODEL_KEY_STATE_MSFT = 1000055000, - XR_TYPE_CONTROLLER_MODEL_NODE_PROPERTIES_MSFT = 1000055001, - XR_TYPE_CONTROLLER_MODEL_PROPERTIES_MSFT = 1000055002, - XR_TYPE_CONTROLLER_MODEL_NODE_STATE_MSFT = 1000055003, - XR_TYPE_CONTROLLER_MODEL_STATE_MSFT = 1000055004; - - /** Extends {@code XrResult}. */ - public static final int XR_ERROR_CONTROLLER_MODEL_KEY_INVALID_MSFT = -1000055000; - - protected MSFTControllerModel() { - throw new UnsupportedOperationException(); - } - - // --- [ xrGetControllerModelKeyMSFT ] --- - - public static int nxrGetControllerModelKeyMSFT(XrSession session, long topLevelUserPath, long controllerModelKeyState) { - long __functionAddress = session.getCapabilities().xrGetControllerModelKeyMSFT; - if (CHECKS) { - check(__functionAddress); - } - return callPJPI(session.address(), topLevelUserPath, controllerModelKeyState, __functionAddress); - } - - @NativeType("XrResult") - public static int xrGetControllerModelKeyMSFT(XrSession session, @NativeType("XrPath") long topLevelUserPath, @NativeType("XrControllerModelKeyStateMSFT *") XrControllerModelKeyStateMSFT controllerModelKeyState) { - return nxrGetControllerModelKeyMSFT(session, topLevelUserPath, controllerModelKeyState.address()); - } - - // --- [ xrLoadControllerModelMSFT ] --- - - public static int nxrLoadControllerModelMSFT(XrSession session, long modelKey, int bufferCapacityInput, long bufferCountOutput, long buffer) { - long __functionAddress = session.getCapabilities().xrLoadControllerModelMSFT; - if (CHECKS) { - check(__functionAddress); - } - return callPJPPI(session.address(), modelKey, bufferCapacityInput, bufferCountOutput, buffer, __functionAddress); - } - - @NativeType("XrResult") - public static int xrLoadControllerModelMSFT(XrSession session, @NativeType("XrControllerModelKeyMSFT") long modelKey, @NativeType("uint32_t *") IntBuffer bufferCountOutput, @Nullable @NativeType("uint8_t *") ByteBuffer buffer) { - if (CHECKS) { - check(bufferCountOutput, 1); - } - return nxrLoadControllerModelMSFT(session, modelKey, remainingSafe(buffer), memAddress(bufferCountOutput), memAddressSafe(buffer)); - } - - // --- [ xrGetControllerModelPropertiesMSFT ] --- - - public static int nxrGetControllerModelPropertiesMSFT(XrSession session, long modelKey, long properties) { - long __functionAddress = session.getCapabilities().xrGetControllerModelPropertiesMSFT; - if (CHECKS) { - check(__functionAddress); - } - return callPJPI(session.address(), modelKey, properties, __functionAddress); - } - - @NativeType("XrResult") - public static int xrGetControllerModelPropertiesMSFT(XrSession session, @NativeType("XrControllerModelKeyMSFT") long modelKey, @NativeType("XrControllerModelPropertiesMSFT *") XrControllerModelPropertiesMSFT properties) { - return nxrGetControllerModelPropertiesMSFT(session, modelKey, properties.address()); - } - - // --- [ xrGetControllerModelStateMSFT ] --- - - public static int nxrGetControllerModelStateMSFT(XrSession session, long modelKey, long state) { - long __functionAddress = session.getCapabilities().xrGetControllerModelStateMSFT; - if (CHECKS) { - check(__functionAddress); - } - return callPJPI(session.address(), modelKey, state, __functionAddress); - } - - @NativeType("XrResult") - public static int xrGetControllerModelStateMSFT(XrSession session, @NativeType("XrControllerModelKeyMSFT") long modelKey, @NativeType("XrControllerModelStateMSFT *") XrControllerModelStateMSFT state) { - return nxrGetControllerModelStateMSFT(session, modelKey, state.address()); - } - - /** Array version of: {@link #xrLoadControllerModelMSFT LoadControllerModelMSFT} */ -// @NativeType("XrResult") -// public static int xrLoadControllerModelMSFT(XrSession session, @NativeType("XrControllerModelKeyMSFT") long modelKey, @NativeType("uint32_t *") int[] bufferCountOutput, @Nullable @NativeType("uint8_t *") ByteBuffer buffer) { -// long __functionAddress = session.getCapabilities().xrLoadControllerModelMSFT; -// if (CHECKS) { -// check(__functionAddress); -// check(bufferCountOutput, 1); -// } -// return callPJPPI(session.address(), modelKey, remainingSafe(buffer), bufferCountOutput, memAddressSafe(buffer), __functionAddress); -// } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/MSFTFirstPersonObserver.java b/mcxr-play/src/main/java/org/lwjgl/openxr/MSFTFirstPersonObserver.java deleted file mode 100644 index 77277772..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/MSFTFirstPersonObserver.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -/** The MSFT_first_person_observer extension. */ -public final class MSFTFirstPersonObserver { - - /** The extension specification version. */ - public static final int XR_MSFT_first_person_observer_SPEC_VERSION = 1; - - /** The extension name. */ - public static final String XR_MSFT_FIRST_PERSON_OBSERVER_EXTENSION_NAME = "XR_MSFT_first_person_observer"; - - /** Extends {@code XrViewConfigurationType}. */ - public static final int XR_VIEW_CONFIGURATION_TYPE_SECONDARY_MONO_FIRST_PERSON_OBSERVER_MSFT = 1000054000; - - private MSFTFirstPersonObserver() {} - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/MSFTHandInteraction.java b/mcxr-play/src/main/java/org/lwjgl/openxr/MSFTHandInteraction.java deleted file mode 100644 index 8d9fe737..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/MSFTHandInteraction.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -/** The MSFT_hand_interaction extension. */ -public final class MSFTHandInteraction { - - /** The extension specification version. */ - public static final int XR_MSFT_hand_interaction_SPEC_VERSION = 1; - - /** The extension name. */ - public static final String XR_MSFT_HAND_INTERACTION_EXTENSION_NAME = "XR_MSFT_hand_interaction"; - - private MSFTHandInteraction() {} - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/MSFTHandTrackingMesh.java b/mcxr-play/src/main/java/org/lwjgl/openxr/MSFTHandTrackingMesh.java deleted file mode 100644 index 0d02add4..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/MSFTHandTrackingMesh.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.PointerBuffer; -import org.lwjgl.system.NativeType; - -import static org.lwjgl.system.Checks.CHECKS; -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.JNI.callPPPI; -import static org.lwjgl.system.MemoryUtil.memAddress; - -/** The MSFT_hand_tracking_mesh extension. */ -public class MSFTHandTrackingMesh { - - /** The extension specification version. */ - public static final int XR_MSFT_hand_tracking_mesh_SPEC_VERSION = 3; - - /** The extension name. */ - public static final String XR_MSFT_HAND_TRACKING_MESH_EXTENSION_NAME = "XR_MSFT_hand_tracking_mesh"; - - /** - * Extends {@code XrStructureType}. - * - *
Enum values:
- * - *
    - *
  • {@link #XR_TYPE_SYSTEM_HAND_TRACKING_MESH_PROPERTIES_MSFT TYPE_SYSTEM_HAND_TRACKING_MESH_PROPERTIES_MSFT}
  • - *
  • {@link #XR_TYPE_HAND_MESH_SPACE_CREATE_INFO_MSFT TYPE_HAND_MESH_SPACE_CREATE_INFO_MSFT}
  • - *
  • {@link #XR_TYPE_HAND_MESH_UPDATE_INFO_MSFT TYPE_HAND_MESH_UPDATE_INFO_MSFT}
  • - *
  • {@link #XR_TYPE_HAND_MESH_MSFT TYPE_HAND_MESH_MSFT}
  • - *
  • {@link #XR_TYPE_HAND_POSE_TYPE_INFO_MSFT TYPE_HAND_POSE_TYPE_INFO_MSFT}
  • - *
- */ - public static final int - XR_TYPE_SYSTEM_HAND_TRACKING_MESH_PROPERTIES_MSFT = 1000052000, - XR_TYPE_HAND_MESH_SPACE_CREATE_INFO_MSFT = 1000052001, - XR_TYPE_HAND_MESH_UPDATE_INFO_MSFT = 1000052002, - XR_TYPE_HAND_MESH_MSFT = 1000052003, - XR_TYPE_HAND_POSE_TYPE_INFO_MSFT = 1000052004; - - /** - * XrHandPoseTypeMSFT - * - *
Enum values:
- * - *
    - *
  • {@link #XR_HAND_POSE_TYPE_TRACKED_MSFT HAND_POSE_TYPE_TRACKED_MSFT}
  • - *
  • {@link #XR_HAND_POSE_TYPE_REFERENCE_OPEN_PALM_MSFT HAND_POSE_TYPE_REFERENCE_OPEN_PALM_MSFT}
  • - *
- */ - public static final int - XR_HAND_POSE_TYPE_TRACKED_MSFT = 0, - XR_HAND_POSE_TYPE_REFERENCE_OPEN_PALM_MSFT = 1; - - protected MSFTHandTrackingMesh() { - throw new UnsupportedOperationException(); - } - - // --- [ xrCreateHandMeshSpaceMSFT ] --- - - public static int nxrCreateHandMeshSpaceMSFT(XrHandTrackerEXT handTracker, long createInfo, long space) { - long __functionAddress = handTracker.getCapabilities().xrCreateHandMeshSpaceMSFT; - if (CHECKS) { - check(__functionAddress); - } - return callPPPI(handTracker.address(), createInfo, space, __functionAddress); - } - - @NativeType("XrResult") - public static int xrCreateHandMeshSpaceMSFT(XrHandTrackerEXT handTracker, @NativeType("XrHandMeshSpaceCreateInfoMSFT const *") XrHandMeshSpaceCreateInfoMSFT createInfo, @NativeType("XrSpace *") PointerBuffer space) { - if (CHECKS) { - check(space, 1); - } - return nxrCreateHandMeshSpaceMSFT(handTracker, createInfo.address(), memAddress(space)); - } - - // --- [ xrUpdateHandMeshMSFT ] --- - - public static int nxrUpdateHandMeshMSFT(XrHandTrackerEXT handTracker, long updateInfo, long handMesh) { - long __functionAddress = handTracker.getCapabilities().xrUpdateHandMeshMSFT; - if (CHECKS) { - check(__functionAddress); - } - return callPPPI(handTracker.address(), updateInfo, handMesh, __functionAddress); - } - - @NativeType("XrResult") - public static int xrUpdateHandMeshMSFT(XrHandTrackerEXT handTracker, @NativeType("XrHandMeshUpdateInfoMSFT const *") XrHandMeshUpdateInfoMSFT updateInfo, @NativeType("XrHandMeshMSFT *") XrHandMeshMSFT handMesh) { - return nxrUpdateHandMeshMSFT(handTracker, updateInfo.address(), handMesh.address()); - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/MSFTHolographicWindowAttachment.java b/mcxr-play/src/main/java/org/lwjgl/openxr/MSFTHolographicWindowAttachment.java deleted file mode 100644 index bfc41104..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/MSFTHolographicWindowAttachment.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -/** The MSFT_holographic_window_attachment extension. */ -public final class MSFTHolographicWindowAttachment { - - /** The extension specification version. */ - public static final int XR_MSFT_holographic_window_attachment_SPEC_VERSION = 1; - - /** The extension name. */ - public static final String XR_MSFT_HOLOGRAPHIC_WINDOW_ATTACHMENT_EXTENSION_NAME = "XR_MSFT_holographic_window_attachment"; - - /** Extends {@code XrStructureType}. */ - public static final int XR_TYPE_HOLOGRAPHIC_WINDOW_ATTACHMENT_MSFT = 1000063000; - - private MSFTHolographicWindowAttachment() {} - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/MSFTPerceptionAnchorInterop.java b/mcxr-play/src/main/java/org/lwjgl/openxr/MSFTPerceptionAnchorInterop.java deleted file mode 100644 index 2d070e37..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/MSFTPerceptionAnchorInterop.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.PointerBuffer; -import org.lwjgl.system.NativeType; - -import static org.lwjgl.system.Checks.CHECKS; -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.JNI.callPPPI; -import static org.lwjgl.system.MemoryUtil.memAddress; - -/** The MSFT_perception_anchor_interop extension. */ -public class MSFTPerceptionAnchorInterop { - - /** The extension specification version. */ - public static final int XR_MSFT_perception_anchor_interop_SPEC_VERSION = 1; - - /** The extension name. */ - public static final String XR_MSFT_PERCEPTION_ANCHOR_INTEROP_EXTENSION_NAME = "XR_MSFT_perception_anchor_interop"; - - protected MSFTPerceptionAnchorInterop() { - throw new UnsupportedOperationException(); - } - - // --- [ xrCreateSpatialAnchorFromPerceptionAnchorMSFT ] --- - - public static int nxrCreateSpatialAnchorFromPerceptionAnchorMSFT(XrSession session, long perceptionAnchor, long anchor) { - long __functionAddress = session.getCapabilities().xrCreateSpatialAnchorFromPerceptionAnchorMSFT; - if (CHECKS) { - check(__functionAddress); - } - return callPPPI(session.address(), perceptionAnchor, anchor, __functionAddress); - } - - @NativeType("XrResult") - public static int xrCreateSpatialAnchorFromPerceptionAnchorMSFT(XrSession session, @NativeType("IUnknown *") PointerBuffer perceptionAnchor, @NativeType("XrSpatialAnchorMSFT *") PointerBuffer anchor) { - if (CHECKS) { - check(perceptionAnchor, 1); - check(anchor, 1); - } - return nxrCreateSpatialAnchorFromPerceptionAnchorMSFT(session, memAddress(perceptionAnchor), memAddress(anchor)); - } - - // --- [ xrTryGetPerceptionAnchorFromSpatialAnchorMSFT ] --- - - public static int nxrTryGetPerceptionAnchorFromSpatialAnchorMSFT(XrSession session, XrSpatialAnchorMSFT anchor, long perceptionAnchor) { - long __functionAddress = session.getCapabilities().xrTryGetPerceptionAnchorFromSpatialAnchorMSFT; - if (CHECKS) { - check(__functionAddress); - } - return callPPPI(session.address(), anchor.address(), perceptionAnchor, __functionAddress); - } - - @NativeType("XrResult") - public static int xrTryGetPerceptionAnchorFromSpatialAnchorMSFT(XrSession session, XrSpatialAnchorMSFT anchor, @NativeType("IUnknown **") PointerBuffer perceptionAnchor) { - if (CHECKS) { - check(perceptionAnchor, 1); - } - return nxrTryGetPerceptionAnchorFromSpatialAnchorMSFT(session, anchor, memAddress(perceptionAnchor)); - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/MSFTSceneUnderstanding.java b/mcxr-play/src/main/java/org/lwjgl/openxr/MSFTSceneUnderstanding.java deleted file mode 100644 index 697e12c6..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/MSFTSceneUnderstanding.java +++ /dev/null @@ -1,424 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.PointerBuffer; -import org.lwjgl.system.NativeType; - -import java.nio.IntBuffer; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.memAddress; -import static org.lwjgl.system.MemoryUtil.memAddressSafe; - -/** The MSFT_scene_understanding extension. */ -public class MSFTSceneUnderstanding { - - /** The extension specification version. */ - public static final int XR_MSFT_scene_understanding_SPEC_VERSION = 1; - - /** The extension name. */ - public static final String XR_MSFT_SCENE_UNDERSTANDING_EXTENSION_NAME = "XR_MSFT_scene_understanding"; - - /** - * Extends {@code XrObjectType}. - * - *
Enum values:
- * - *
    - *
  • {@link #XR_OBJECT_TYPE_SCENE_OBSERVER_MSFT OBJECT_TYPE_SCENE_OBSERVER_MSFT}
  • - *
  • {@link #XR_OBJECT_TYPE_SCENE_MSFT OBJECT_TYPE_SCENE_MSFT}
  • - *
- */ - public static final int - XR_OBJECT_TYPE_SCENE_OBSERVER_MSFT = 1000097000, - XR_OBJECT_TYPE_SCENE_MSFT = 1000097001; - - /** - * Extends {@code XrStructureType}. - * - *
Enum values:
- * - *
    - *
  • {@link #XR_TYPE_SCENE_OBSERVER_CREATE_INFO_MSFT TYPE_SCENE_OBSERVER_CREATE_INFO_MSFT}
  • - *
  • {@link #XR_TYPE_SCENE_CREATE_INFO_MSFT TYPE_SCENE_CREATE_INFO_MSFT}
  • - *
  • {@link #XR_TYPE_NEW_SCENE_COMPUTE_INFO_MSFT TYPE_NEW_SCENE_COMPUTE_INFO_MSFT}
  • - *
  • {@link #XR_TYPE_VISUAL_MESH_COMPUTE_LOD_INFO_MSFT TYPE_VISUAL_MESH_COMPUTE_LOD_INFO_MSFT}
  • - *
  • {@link #XR_TYPE_SCENE_COMPONENTS_MSFT TYPE_SCENE_COMPONENTS_MSFT}
  • - *
  • {@link #XR_TYPE_SCENE_COMPONENTS_GET_INFO_MSFT TYPE_SCENE_COMPONENTS_GET_INFO_MSFT}
  • - *
  • {@link #XR_TYPE_SCENE_COMPONENT_LOCATIONS_MSFT TYPE_SCENE_COMPONENT_LOCATIONS_MSFT}
  • - *
  • {@link #XR_TYPE_SCENE_COMPONENTS_LOCATE_INFO_MSFT TYPE_SCENE_COMPONENTS_LOCATE_INFO_MSFT}
  • - *
  • {@link #XR_TYPE_SCENE_OBJECTS_MSFT TYPE_SCENE_OBJECTS_MSFT}
  • - *
  • {@link #XR_TYPE_SCENE_COMPONENT_PARENT_FILTER_INFO_MSFT TYPE_SCENE_COMPONENT_PARENT_FILTER_INFO_MSFT}
  • - *
  • {@link #XR_TYPE_SCENE_OBJECT_TYPES_FILTER_INFO_MSFT TYPE_SCENE_OBJECT_TYPES_FILTER_INFO_MSFT}
  • - *
  • {@link #XR_TYPE_SCENE_PLANES_MSFT TYPE_SCENE_PLANES_MSFT}
  • - *
  • {@link #XR_TYPE_SCENE_PLANE_ALIGNMENT_FILTER_INFO_MSFT TYPE_SCENE_PLANE_ALIGNMENT_FILTER_INFO_MSFT}
  • - *
  • {@link #XR_TYPE_SCENE_MESHES_MSFT TYPE_SCENE_MESHES_MSFT}
  • - *
  • {@link #XR_TYPE_SCENE_MESH_BUFFERS_GET_INFO_MSFT TYPE_SCENE_MESH_BUFFERS_GET_INFO_MSFT}
  • - *
  • {@link #XR_TYPE_SCENE_MESH_BUFFERS_MSFT TYPE_SCENE_MESH_BUFFERS_MSFT}
  • - *
  • {@link #XR_TYPE_SCENE_MESH_VERTEX_BUFFER_MSFT TYPE_SCENE_MESH_VERTEX_BUFFER_MSFT}
  • - *
  • {@link #XR_TYPE_SCENE_MESH_INDICES_UINT32_MSFT TYPE_SCENE_MESH_INDICES_UINT32_MSFT}
  • - *
  • {@link #XR_TYPE_SCENE_MESH_INDICES_UINT16_MSFT TYPE_SCENE_MESH_INDICES_UINT16_MSFT}
  • - *
- */ - public static final int - XR_TYPE_SCENE_OBSERVER_CREATE_INFO_MSFT = 1000097000, - XR_TYPE_SCENE_CREATE_INFO_MSFT = 1000097001, - XR_TYPE_NEW_SCENE_COMPUTE_INFO_MSFT = 1000097002, - XR_TYPE_VISUAL_MESH_COMPUTE_LOD_INFO_MSFT = 1000097003, - XR_TYPE_SCENE_COMPONENTS_MSFT = 1000097004, - XR_TYPE_SCENE_COMPONENTS_GET_INFO_MSFT = 1000097005, - XR_TYPE_SCENE_COMPONENT_LOCATIONS_MSFT = 1000097006, - XR_TYPE_SCENE_COMPONENTS_LOCATE_INFO_MSFT = 1000097007, - XR_TYPE_SCENE_OBJECTS_MSFT = 1000097008, - XR_TYPE_SCENE_COMPONENT_PARENT_FILTER_INFO_MSFT = 1000097009, - XR_TYPE_SCENE_OBJECT_TYPES_FILTER_INFO_MSFT = 1000097010, - XR_TYPE_SCENE_PLANES_MSFT = 1000097011, - XR_TYPE_SCENE_PLANE_ALIGNMENT_FILTER_INFO_MSFT = 1000097012, - XR_TYPE_SCENE_MESHES_MSFT = 1000097013, - XR_TYPE_SCENE_MESH_BUFFERS_GET_INFO_MSFT = 1000097014, - XR_TYPE_SCENE_MESH_BUFFERS_MSFT = 1000097015, - XR_TYPE_SCENE_MESH_VERTEX_BUFFER_MSFT = 1000097016, - XR_TYPE_SCENE_MESH_INDICES_UINT32_MSFT = 1000097017, - XR_TYPE_SCENE_MESH_INDICES_UINT16_MSFT = 1000097018; - - /** - * Extends {@code XrResult}. - * - *
Enum values:
- * - *
    - *
  • {@link #XR_ERROR_COMPUTE_NEW_SCENE_NOT_COMPLETED_MSFT ERROR_COMPUTE_NEW_SCENE_NOT_COMPLETED_MSFT}
  • - *
  • {@link #XR_ERROR_SCENE_COMPONENT_ID_INVALID_MSFT ERROR_SCENE_COMPONENT_ID_INVALID_MSFT}
  • - *
  • {@link #XR_ERROR_SCENE_COMPONENT_TYPE_MISMATCH_MSFT ERROR_SCENE_COMPONENT_TYPE_MISMATCH_MSFT}
  • - *
  • {@link #XR_ERROR_SCENE_MESH_BUFFER_ID_INVALID_MSFT ERROR_SCENE_MESH_BUFFER_ID_INVALID_MSFT}
  • - *
  • {@link #XR_ERROR_SCENE_COMPUTE_FEATURE_INCOMPATIBLE_MSFT ERROR_SCENE_COMPUTE_FEATURE_INCOMPATIBLE_MSFT}
  • - *
  • {@link #XR_ERROR_SCENE_COMPUTE_CONSISTENCY_MISMATCH_MSFT ERROR_SCENE_COMPUTE_CONSISTENCY_MISMATCH_MSFT}
  • - *
- */ - public static final int - XR_ERROR_COMPUTE_NEW_SCENE_NOT_COMPLETED_MSFT = -1000097000, - XR_ERROR_SCENE_COMPONENT_ID_INVALID_MSFT = -1000097001, - XR_ERROR_SCENE_COMPONENT_TYPE_MISMATCH_MSFT = -1000097002, - XR_ERROR_SCENE_MESH_BUFFER_ID_INVALID_MSFT = -1000097003, - XR_ERROR_SCENE_COMPUTE_FEATURE_INCOMPATIBLE_MSFT = -1000097004, - XR_ERROR_SCENE_COMPUTE_CONSISTENCY_MISMATCH_MSFT = -1000097005; - - /** - * XrSceneComputeFeatureMSFT - * - *
Enum values:
- * - *
    - *
  • {@link #XR_SCENE_COMPUTE_FEATURE_PLANE_MSFT SCENE_COMPUTE_FEATURE_PLANE_MSFT}
  • - *
  • {@link #XR_SCENE_COMPUTE_FEATURE_PLANE_MESH_MSFT SCENE_COMPUTE_FEATURE_PLANE_MESH_MSFT}
  • - *
  • {@link #XR_SCENE_COMPUTE_FEATURE_VISUAL_MESH_MSFT SCENE_COMPUTE_FEATURE_VISUAL_MESH_MSFT}
  • - *
  • {@link #XR_SCENE_COMPUTE_FEATURE_COLLIDER_MESH_MSFT SCENE_COMPUTE_FEATURE_COLLIDER_MESH_MSFT}
  • - *
- */ - public static final int - XR_SCENE_COMPUTE_FEATURE_PLANE_MSFT = 1, - XR_SCENE_COMPUTE_FEATURE_PLANE_MESH_MSFT = 2, - XR_SCENE_COMPUTE_FEATURE_VISUAL_MESH_MSFT = 3, - XR_SCENE_COMPUTE_FEATURE_COLLIDER_MESH_MSFT = 4; - - /** - * XrSceneComputeConsistencyMSFT - * - *
Enum values:
- * - *
    - *
  • {@link #XR_SCENE_COMPUTE_CONSISTENCY_SNAPSHOT_COMPLETE_MSFT SCENE_COMPUTE_CONSISTENCY_SNAPSHOT_COMPLETE_MSFT}
  • - *
  • {@link #XR_SCENE_COMPUTE_CONSISTENCY_SNAPSHOT_INCOMPLETE_FAST_MSFT SCENE_COMPUTE_CONSISTENCY_SNAPSHOT_INCOMPLETE_FAST_MSFT}
  • - *
  • {@link #XR_SCENE_COMPUTE_CONSISTENCY_OCCLUSION_OPTIMIZED_MSFT SCENE_COMPUTE_CONSISTENCY_OCCLUSION_OPTIMIZED_MSFT}
  • - *
- */ - public static final int - XR_SCENE_COMPUTE_CONSISTENCY_SNAPSHOT_COMPLETE_MSFT = 1, - XR_SCENE_COMPUTE_CONSISTENCY_SNAPSHOT_INCOMPLETE_FAST_MSFT = 2, - XR_SCENE_COMPUTE_CONSISTENCY_OCCLUSION_OPTIMIZED_MSFT = 3; - - /** - * XrMeshComputeLodMSFT - * - *
Enum values:
- * - *
    - *
  • {@link #XR_MESH_COMPUTE_LOD_COARSE_MSFT MESH_COMPUTE_LOD_COARSE_MSFT}
  • - *
  • {@link #XR_MESH_COMPUTE_LOD_MEDIUM_MSFT MESH_COMPUTE_LOD_MEDIUM_MSFT}
  • - *
  • {@link #XR_MESH_COMPUTE_LOD_FINE_MSFT MESH_COMPUTE_LOD_FINE_MSFT}
  • - *
  • {@link #XR_MESH_COMPUTE_LOD_UNLIMITED_MSFT MESH_COMPUTE_LOD_UNLIMITED_MSFT}
  • - *
- */ - public static final int - XR_MESH_COMPUTE_LOD_COARSE_MSFT = 1, - XR_MESH_COMPUTE_LOD_MEDIUM_MSFT = 2, - XR_MESH_COMPUTE_LOD_FINE_MSFT = 3, - XR_MESH_COMPUTE_LOD_UNLIMITED_MSFT = 4; - - /** - * XrSceneComponentTypeMSFT - * - *
Enum values:
- * - *
    - *
  • {@link #XR_SCENE_COMPONENT_TYPE_INVALID_MSFT SCENE_COMPONENT_TYPE_INVALID_MSFT}
  • - *
  • {@link #XR_SCENE_COMPONENT_TYPE_OBJECT_MSFT SCENE_COMPONENT_TYPE_OBJECT_MSFT}
  • - *
  • {@link #XR_SCENE_COMPONENT_TYPE_PLANE_MSFT SCENE_COMPONENT_TYPE_PLANE_MSFT}
  • - *
  • {@link #XR_SCENE_COMPONENT_TYPE_VISUAL_MESH_MSFT SCENE_COMPONENT_TYPE_VISUAL_MESH_MSFT}
  • - *
  • {@link #XR_SCENE_COMPONENT_TYPE_COLLIDER_MESH_MSFT SCENE_COMPONENT_TYPE_COLLIDER_MESH_MSFT}
  • - *
- */ - public static final int - XR_SCENE_COMPONENT_TYPE_INVALID_MSFT = -1, - XR_SCENE_COMPONENT_TYPE_OBJECT_MSFT = 1, - XR_SCENE_COMPONENT_TYPE_PLANE_MSFT = 2, - XR_SCENE_COMPONENT_TYPE_VISUAL_MESH_MSFT = 3, - XR_SCENE_COMPONENT_TYPE_COLLIDER_MESH_MSFT = 4; - - /** - * XrSceneObjectTypeMSFT - * - *
Enum values:
- * - *
    - *
  • {@link #XR_SCENE_OBJECT_TYPE_UNCATEGORIZED_MSFT SCENE_OBJECT_TYPE_UNCATEGORIZED_MSFT}
  • - *
  • {@link #XR_SCENE_OBJECT_TYPE_BACKGROUND_MSFT SCENE_OBJECT_TYPE_BACKGROUND_MSFT}
  • - *
  • {@link #XR_SCENE_OBJECT_TYPE_WALL_MSFT SCENE_OBJECT_TYPE_WALL_MSFT}
  • - *
  • {@link #XR_SCENE_OBJECT_TYPE_FLOOR_MSFT SCENE_OBJECT_TYPE_FLOOR_MSFT}
  • - *
  • {@link #XR_SCENE_OBJECT_TYPE_CEILING_MSFT SCENE_OBJECT_TYPE_CEILING_MSFT}
  • - *
  • {@link #XR_SCENE_OBJECT_TYPE_PLATFORM_MSFT SCENE_OBJECT_TYPE_PLATFORM_MSFT}
  • - *
  • {@link #XR_SCENE_OBJECT_TYPE_INFERRED_MSFT SCENE_OBJECT_TYPE_INFERRED_MSFT}
  • - *
- */ - public static final int - XR_SCENE_OBJECT_TYPE_UNCATEGORIZED_MSFT = -1, - XR_SCENE_OBJECT_TYPE_BACKGROUND_MSFT = 1, - XR_SCENE_OBJECT_TYPE_WALL_MSFT = 2, - XR_SCENE_OBJECT_TYPE_FLOOR_MSFT = 3, - XR_SCENE_OBJECT_TYPE_CEILING_MSFT = 4, - XR_SCENE_OBJECT_TYPE_PLATFORM_MSFT = 5, - XR_SCENE_OBJECT_TYPE_INFERRED_MSFT = 6; - - /** - * XrScenePlaneAlignmentTypeMSFT - * - *
Enum values:
- * - *
    - *
  • {@link #XR_SCENE_PLANE_ALIGNMENT_TYPE_NON_ORTHOGONAL_MSFT SCENE_PLANE_ALIGNMENT_TYPE_NON_ORTHOGONAL_MSFT}
  • - *
  • {@link #XR_SCENE_PLANE_ALIGNMENT_TYPE_HORIZONTAL_MSFT SCENE_PLANE_ALIGNMENT_TYPE_HORIZONTAL_MSFT}
  • - *
  • {@link #XR_SCENE_PLANE_ALIGNMENT_TYPE_VERTICAL_MSFT SCENE_PLANE_ALIGNMENT_TYPE_VERTICAL_MSFT}
  • - *
- */ - public static final int - XR_SCENE_PLANE_ALIGNMENT_TYPE_NON_ORTHOGONAL_MSFT = 0, - XR_SCENE_PLANE_ALIGNMENT_TYPE_HORIZONTAL_MSFT = 1, - XR_SCENE_PLANE_ALIGNMENT_TYPE_VERTICAL_MSFT = 2; - - /** - * XrSceneComputeStateMSFT - * - *
Enum values:
- * - *
    - *
  • {@link #XR_SCENE_COMPUTE_STATE_NONE_MSFT SCENE_COMPUTE_STATE_NONE_MSFT}
  • - *
  • {@link #XR_SCENE_COMPUTE_STATE_UPDATING_MSFT SCENE_COMPUTE_STATE_UPDATING_MSFT}
  • - *
  • {@link #XR_SCENE_COMPUTE_STATE_COMPLETED_MSFT SCENE_COMPUTE_STATE_COMPLETED_MSFT}
  • - *
  • {@link #XR_SCENE_COMPUTE_STATE_COMPLETED_WITH_ERROR_MSFT SCENE_COMPUTE_STATE_COMPLETED_WITH_ERROR_MSFT}
  • - *
- */ - public static final int - XR_SCENE_COMPUTE_STATE_NONE_MSFT = 0, - XR_SCENE_COMPUTE_STATE_UPDATING_MSFT = 1, - XR_SCENE_COMPUTE_STATE_COMPLETED_MSFT = 2, - XR_SCENE_COMPUTE_STATE_COMPLETED_WITH_ERROR_MSFT = 3; - - protected MSFTSceneUnderstanding() { - throw new UnsupportedOperationException(); - } - - // --- [ xrEnumerateSceneComputeFeaturesMSFT ] --- - - public static int nxrEnumerateSceneComputeFeaturesMSFT(XrInstance instance, long systemId, int featureCapacityInput, long featureCountOutput, long features) { - long __functionAddress = instance.getCapabilities().xrEnumerateSceneComputeFeaturesMSFT; - if (CHECKS) { - check(__functionAddress); - } - return callPJPPI(instance.address(), systemId, featureCapacityInput, featureCountOutput, features, __functionAddress); - } - - @NativeType("XrResult") - public static int xrEnumerateSceneComputeFeaturesMSFT(XrInstance instance, @NativeType("XrSystemId") long systemId, @NativeType("uint32_t *") IntBuffer featureCountOutput, @Nullable @NativeType("XrSceneComputeFeatureMSFT *") IntBuffer features) { - if (CHECKS) { - check(featureCountOutput, 1); - } - return nxrEnumerateSceneComputeFeaturesMSFT(instance, systemId, remainingSafe(features), memAddress(featureCountOutput), memAddressSafe(features)); - } - - // --- [ xrCreateSceneObserverMSFT ] --- - - public static int nxrCreateSceneObserverMSFT(XrSession session, long createInfo, long sceneObserver) { - long __functionAddress = session.getCapabilities().xrCreateSceneObserverMSFT; - if (CHECKS) { - check(__functionAddress); - } - return callPPPI(session.address(), createInfo, sceneObserver, __functionAddress); - } - - @NativeType("XrResult") - public static int xrCreateSceneObserverMSFT(XrSession session, @Nullable @NativeType("XrSceneObserverCreateInfoMSFT const *") XrSceneObserverCreateInfoMSFT createInfo, @NativeType("XrSceneObserverMSFT *") PointerBuffer sceneObserver) { - if (CHECKS) { - check(sceneObserver, 1); - } - return nxrCreateSceneObserverMSFT(session, memAddressSafe(createInfo), memAddress(sceneObserver)); - } - - // --- [ xrDestroySceneObserverMSFT ] --- - - @NativeType("XrResult") - public static int xrDestroySceneObserverMSFT(XrSceneObserverMSFT sceneObserver) { - long __functionAddress = sceneObserver.getCapabilities().xrDestroySceneObserverMSFT; - if (CHECKS) { - check(__functionAddress); - } - return callPI(sceneObserver.address(), __functionAddress); - } - - // --- [ xrCreateSceneMSFT ] --- - - public static int nxrCreateSceneMSFT(XrSceneObserverMSFT sceneObserver, long createInfo, long scene) { - long __functionAddress = sceneObserver.getCapabilities().xrCreateSceneMSFT; - if (CHECKS) { - check(__functionAddress); - } - return callPPPI(sceneObserver.address(), createInfo, scene, __functionAddress); - } - - @NativeType("XrResult") - public static int xrCreateSceneMSFT(XrSceneObserverMSFT sceneObserver, @Nullable @NativeType("XrSceneCreateInfoMSFT const *") XrSceneCreateInfoMSFT createInfo, @NativeType("XrSceneMSFT *") PointerBuffer scene) { - if (CHECKS) { - check(scene, 1); - } - return nxrCreateSceneMSFT(sceneObserver, memAddressSafe(createInfo), memAddress(scene)); - } - - // --- [ xrDestroySceneMSFT ] --- - - @NativeType("XrResult") - public static int xrDestroySceneMSFT(XrSceneMSFT scene) { - long __functionAddress = scene.getCapabilities().xrDestroySceneMSFT; - if (CHECKS) { - check(__functionAddress); - } - return callPI(scene.address(), __functionAddress); - } - - // --- [ xrComputeNewSceneMSFT ] --- - - public static int nxrComputeNewSceneMSFT(XrSceneObserverMSFT sceneObserver, long computeInfo) { - long __functionAddress = sceneObserver.getCapabilities().xrComputeNewSceneMSFT; - if (CHECKS) { - check(__functionAddress); - XrNewSceneComputeInfoMSFT.validate(computeInfo); - } - return callPPI(sceneObserver.address(), computeInfo, __functionAddress); - } - - @NativeType("XrResult") - public static int xrComputeNewSceneMSFT(XrSceneObserverMSFT sceneObserver, @NativeType("XrNewSceneComputeInfoMSFT const *") XrNewSceneComputeInfoMSFT computeInfo) { - return nxrComputeNewSceneMSFT(sceneObserver, computeInfo.address()); - } - - // --- [ xrGetSceneComputeStateMSFT ] --- - - public static int nxrGetSceneComputeStateMSFT(XrSceneObserverMSFT sceneObserver, long state) { - long __functionAddress = sceneObserver.getCapabilities().xrGetSceneComputeStateMSFT; - if (CHECKS) { - check(__functionAddress); - } - return callPPI(sceneObserver.address(), state, __functionAddress); - } - - @NativeType("XrResult") - public static int xrGetSceneComputeStateMSFT(XrSceneObserverMSFT sceneObserver, @NativeType("XrSceneComputeStateMSFT *") IntBuffer state) { - if (CHECKS) { - check(state, 1); - } - return nxrGetSceneComputeStateMSFT(sceneObserver, memAddress(state)); - } - - // --- [ xrGetSceneComponentsMSFT ] --- - - public static int nxrGetSceneComponentsMSFT(XrSceneMSFT scene, long getInfo, long components) { - long __functionAddress = scene.getCapabilities().xrGetSceneComponentsMSFT; - if (CHECKS) { - check(__functionAddress); - } - return callPPPI(scene.address(), getInfo, components, __functionAddress); - } - - @NativeType("XrResult") - public static int xrGetSceneComponentsMSFT(XrSceneMSFT scene, @NativeType("XrSceneComponentsGetInfoMSFT const *") XrSceneComponentsGetInfoMSFT getInfo, @NativeType("XrSceneComponentsMSFT *") XrSceneComponentsMSFT components) { - return nxrGetSceneComponentsMSFT(scene, getInfo.address(), components.address()); - } - - // --- [ xrLocateSceneComponentsMSFT ] --- - - public static int nxrLocateSceneComponentsMSFT(XrSceneMSFT scene, long locateInfo, long locations) { - long __functionAddress = scene.getCapabilities().xrLocateSceneComponentsMSFT; - if (CHECKS) { - check(__functionAddress); - XrSceneComponentsLocateInfoMSFT.validate(locateInfo); - } - return callPPPI(scene.address(), locateInfo, locations, __functionAddress); - } - - @NativeType("XrResult") - public static int xrLocateSceneComponentsMSFT(XrSceneMSFT scene, @NativeType("XrSceneComponentsLocateInfoMSFT const *") XrSceneComponentsLocateInfoMSFT locateInfo, @NativeType("XrSceneComponentLocationsMSFT *") XrSceneComponentLocationsMSFT locations) { - return nxrLocateSceneComponentsMSFT(scene, locateInfo.address(), locations.address()); - } - - // --- [ xrGetSceneMeshBuffersMSFT ] --- - - public static int nxrGetSceneMeshBuffersMSFT(XrSceneMSFT scene, long getInfo, long buffers) { - long __functionAddress = scene.getCapabilities().xrGetSceneMeshBuffersMSFT; - if (CHECKS) { - check(__functionAddress); - } - return callPPPI(scene.address(), getInfo, buffers, __functionAddress); - } - - @NativeType("XrResult") - public static int xrGetSceneMeshBuffersMSFT(XrSceneMSFT scene, @NativeType("XrSceneMeshBuffersGetInfoMSFT const *") XrSceneMeshBuffersGetInfoMSFT getInfo, @NativeType("XrSceneMeshBuffersMSFT *") XrSceneMeshBuffersMSFT buffers) { - return nxrGetSceneMeshBuffersMSFT(scene, getInfo.address(), buffers.address()); - } - - /** Array version of: {@link #xrEnumerateSceneComputeFeaturesMSFT EnumerateSceneComputeFeaturesMSFT} */ - @NativeType("XrResult") - public static int xrEnumerateSceneComputeFeaturesMSFT(XrInstance instance, @NativeType("XrSystemId") long systemId, @NativeType("uint32_t *") int[] featureCountOutput, @Nullable @NativeType("XrSceneComputeFeatureMSFT *") int[] features) { - long __functionAddress = instance.getCapabilities().xrEnumerateSceneComputeFeaturesMSFT; - if (CHECKS) { - check(__functionAddress); - check(featureCountOutput, 1); - } - return callPJPPI(instance.address(), systemId, lengthSafe(features), featureCountOutput, features, __functionAddress); - } - - /** Array version of: {@link #xrGetSceneComputeStateMSFT GetSceneComputeStateMSFT} */ - @NativeType("XrResult") - public static int xrGetSceneComputeStateMSFT(XrSceneObserverMSFT sceneObserver, @NativeType("XrSceneComputeStateMSFT *") int[] state) { - long __functionAddress = sceneObserver.getCapabilities().xrGetSceneComputeStateMSFT; - if (CHECKS) { - check(__functionAddress); - check(state, 1); - } - return callPPI(sceneObserver.address(), state, __functionAddress); - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/MSFTSceneUnderstandingSerialization.java b/mcxr-play/src/main/java/org/lwjgl/openxr/MSFTSceneUnderstandingSerialization.java deleted file mode 100644 index b222fa78..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/MSFTSceneUnderstandingSerialization.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.system.NativeType; - -import java.nio.ByteBuffer; -import java.nio.IntBuffer; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.callPPI; -import static org.lwjgl.system.JNI.callPPPPI; -import static org.lwjgl.system.MemoryUtil.memAddress; -import static org.lwjgl.system.MemoryUtil.memAddressSafe; - -/** The MSFT_scene_understanding_serialization extension. */ -public class MSFTSceneUnderstandingSerialization { - - /** The extension specification version. */ - public static final int XR_MSFT_scene_understanding_serialization_SPEC_VERSION = 1; - - /** The extension name. */ - public static final String XR_MSFT_SCENE_UNDERSTANDING_SERIALIZATION_EXTENSION_NAME = "XR_MSFT_scene_understanding_serialization"; - - /** - * Extends {@code XrStructureType}. - * - *
Enum values:
- * - *
    - *
  • {@link #XR_TYPE_SERIALIZED_SCENE_FRAGMENT_DATA_GET_INFO_MSFT TYPE_SERIALIZED_SCENE_FRAGMENT_DATA_GET_INFO_MSFT}
  • - *
  • {@link #XR_TYPE_SCENE_DESERIALIZE_INFO_MSFT TYPE_SCENE_DESERIALIZE_INFO_MSFT}
  • - *
- */ - public static final int - XR_TYPE_SERIALIZED_SCENE_FRAGMENT_DATA_GET_INFO_MSFT = 1000098000, - XR_TYPE_SCENE_DESERIALIZE_INFO_MSFT = 1000098001; - - /** Extends {@code XrSceneComputeFeatureMSFT}. */ - public static final int XR_SCENE_COMPUTE_FEATURE_SERIALIZE_SCENE_MSFT = 1000098000; - - /** Extends {@code XrSceneComponentTypeMSFT}. */ - public static final int XR_SCENE_COMPONENT_TYPE_SERIALIZED_SCENE_FRAGMENT_MSFT = 1000098000; - - protected MSFTSceneUnderstandingSerialization() { - throw new UnsupportedOperationException(); - } - - // --- [ xrDeserializeSceneMSFT ] --- - - public static int nxrDeserializeSceneMSFT(XrSceneObserverMSFT sceneObserver, long deserializeInfo) { - long __functionAddress = sceneObserver.getCapabilities().xrDeserializeSceneMSFT; - if (CHECKS) { - check(__functionAddress); - } - return callPPI(sceneObserver.address(), deserializeInfo, __functionAddress); - } - - @NativeType("XrResult") - public static int xrDeserializeSceneMSFT(XrSceneObserverMSFT sceneObserver, @NativeType("XrSceneDeserializeInfoMSFT const *") XrSceneDeserializeInfoMSFT deserializeInfo) { - return nxrDeserializeSceneMSFT(sceneObserver, deserializeInfo.address()); - } - - // --- [ xrGetSerializedSceneFragmentDataMSFT ] --- - - public static int nxrGetSerializedSceneFragmentDataMSFT(XrSceneMSFT scene, long getInfo, int countInput, long readOutput, long buffer) { - long __functionAddress = scene.getCapabilities().xrGetSerializedSceneFragmentDataMSFT; - if (CHECKS) { - check(__functionAddress); - } - return callPPPPI(scene.address(), getInfo, countInput, readOutput, buffer, __functionAddress); - } - - @NativeType("XrResult") - public static int xrGetSerializedSceneFragmentDataMSFT(XrSceneMSFT scene, @NativeType("XrSerializedSceneFragmentDataGetInfoMSFT const *") XrSerializedSceneFragmentDataGetInfoMSFT getInfo, @NativeType("uint32_t *") IntBuffer readOutput, @Nullable @NativeType("uint8_t *") ByteBuffer buffer) { - if (CHECKS) { - check(readOutput, 1); - } - return nxrGetSerializedSceneFragmentDataMSFT(scene, getInfo.address(), remainingSafe(buffer), memAddress(readOutput), memAddressSafe(buffer)); - } - - /** Array version of: {@link #xrGetSerializedSceneFragmentDataMSFT GetSerializedSceneFragmentDataMSFT} */ -// @NativeType("XrResult") -// public static int xrGetSerializedSceneFragmentDataMSFT(XrSceneMSFT scene, @NativeType("XrSerializedSceneFragmentDataGetInfoMSFT const *") XrSerializedSceneFragmentDataGetInfoMSFT getInfo, @NativeType("uint32_t *") int[] readOutput, @Nullable @NativeType("uint8_t *") ByteBuffer buffer) { -// long __functionAddress = scene.getCapabilities().xrGetSerializedSceneFragmentDataMSFT; -// if (CHECKS) { -// check(__functionAddress); -// check(readOutput, 1); -// } -// return callPPPPI(scene.address(), getInfo.address(), remainingSafe(buffer), readOutput, memAddressSafe(buffer), __functionAddress); -// } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/MSFTSecondaryViewConfiguration.java b/mcxr-play/src/main/java/org/lwjgl/openxr/MSFTSecondaryViewConfiguration.java deleted file mode 100644 index bff120b2..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/MSFTSecondaryViewConfiguration.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -/** The MSFT_secondary_view_configuration extension. */ -public final class MSFTSecondaryViewConfiguration { - - /** The extension specification version. */ - public static final int XR_MSFT_secondary_view_configuration_SPEC_VERSION = 1; - - /** The extension name. */ - public static final String XR_MSFT_SECONDARY_VIEW_CONFIGURATION_EXTENSION_NAME = "XR_MSFT_secondary_view_configuration"; - - /** - * Extends {@code XrStructureType}. - * - *
Enum values:
- * - *
    - *
  • {@link #XR_TYPE_SECONDARY_VIEW_CONFIGURATION_SESSION_BEGIN_INFO_MSFT TYPE_SECONDARY_VIEW_CONFIGURATION_SESSION_BEGIN_INFO_MSFT}
  • - *
  • {@link #XR_TYPE_SECONDARY_VIEW_CONFIGURATION_STATE_MSFT TYPE_SECONDARY_VIEW_CONFIGURATION_STATE_MSFT}
  • - *
  • {@link #XR_TYPE_SECONDARY_VIEW_CONFIGURATION_FRAME_STATE_MSFT TYPE_SECONDARY_VIEW_CONFIGURATION_FRAME_STATE_MSFT}
  • - *
  • {@link #XR_TYPE_SECONDARY_VIEW_CONFIGURATION_FRAME_END_INFO_MSFT TYPE_SECONDARY_VIEW_CONFIGURATION_FRAME_END_INFO_MSFT}
  • - *
  • {@link #XR_TYPE_SECONDARY_VIEW_CONFIGURATION_LAYER_INFO_MSFT TYPE_SECONDARY_VIEW_CONFIGURATION_LAYER_INFO_MSFT}
  • - *
  • {@link #XR_TYPE_SECONDARY_VIEW_CONFIGURATION_SWAPCHAIN_CREATE_INFO_MSFT TYPE_SECONDARY_VIEW_CONFIGURATION_SWAPCHAIN_CREATE_INFO_MSFT}
  • - *
- */ - public static final int - XR_TYPE_SECONDARY_VIEW_CONFIGURATION_SESSION_BEGIN_INFO_MSFT = 1000053000, - XR_TYPE_SECONDARY_VIEW_CONFIGURATION_STATE_MSFT = 1000053001, - XR_TYPE_SECONDARY_VIEW_CONFIGURATION_FRAME_STATE_MSFT = 1000053002, - XR_TYPE_SECONDARY_VIEW_CONFIGURATION_FRAME_END_INFO_MSFT = 1000053003, - XR_TYPE_SECONDARY_VIEW_CONFIGURATION_LAYER_INFO_MSFT = 1000053004, - XR_TYPE_SECONDARY_VIEW_CONFIGURATION_SWAPCHAIN_CREATE_INFO_MSFT = 1000053005; - - /** Extends {@code XrResult}. */ - public static final int XR_ERROR_SECONDARY_VIEW_CONFIGURATION_TYPE_NOT_ENABLED_MSFT = -1000053000; - - private MSFTSecondaryViewConfiguration() {} - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/MSFTSpatialAnchor.java b/mcxr-play/src/main/java/org/lwjgl/openxr/MSFTSpatialAnchor.java deleted file mode 100644 index bafb949f..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/MSFTSpatialAnchor.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.PointerBuffer; -import org.lwjgl.system.NativeType; - -import static org.lwjgl.system.Checks.CHECKS; -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.JNI.callPI; -import static org.lwjgl.system.JNI.callPPPI; -import static org.lwjgl.system.MemoryUtil.memAddress; - -/** The MSFT_spatial_anchor extension. */ -public class MSFTSpatialAnchor { - - /** The extension specification version. */ - public static final int XR_MSFT_spatial_anchor_SPEC_VERSION = 2; - - /** The extension name. */ - public static final String XR_MSFT_SPATIAL_ANCHOR_EXTENSION_NAME = "XR_MSFT_spatial_anchor"; - - /** - * Extends {@code XrStructureType}. - * - *
Enum values:
- * - *
    - *
  • {@link #XR_TYPE_SPATIAL_ANCHOR_CREATE_INFO_MSFT TYPE_SPATIAL_ANCHOR_CREATE_INFO_MSFT}
  • - *
  • {@link #XR_TYPE_SPATIAL_ANCHOR_SPACE_CREATE_INFO_MSFT TYPE_SPATIAL_ANCHOR_SPACE_CREATE_INFO_MSFT}
  • - *
- */ - public static final int - XR_TYPE_SPATIAL_ANCHOR_CREATE_INFO_MSFT = 1000039000, - XR_TYPE_SPATIAL_ANCHOR_SPACE_CREATE_INFO_MSFT = 1000039001; - - /** Extends {@code XrObjectType}. */ - public static final int XR_OBJECT_TYPE_SPATIAL_ANCHOR_MSFT = 1000039000; - - /** Extends {@code XrResult}. */ - public static final int XR_ERROR_CREATE_SPATIAL_ANCHOR_FAILED_MSFT = -1000039001; - - protected MSFTSpatialAnchor() { - throw new UnsupportedOperationException(); - } - - // --- [ xrCreateSpatialAnchorMSFT ] --- - - public static int nxrCreateSpatialAnchorMSFT(XrSession session, long createInfo, long anchor) { - long __functionAddress = session.getCapabilities().xrCreateSpatialAnchorMSFT; - if (CHECKS) { - check(__functionAddress); - XrSpatialAnchorCreateInfoMSFT.validate(createInfo); - } - return callPPPI(session.address(), createInfo, anchor, __functionAddress); - } - - @NativeType("XrResult") - public static int xrCreateSpatialAnchorMSFT(XrSession session, @NativeType("XrSpatialAnchorCreateInfoMSFT const *") XrSpatialAnchorCreateInfoMSFT createInfo, @NativeType("XrSpatialAnchorMSFT *") PointerBuffer anchor) { - if (CHECKS) { - check(anchor, 1); - } - return nxrCreateSpatialAnchorMSFT(session, createInfo.address(), memAddress(anchor)); - } - - // --- [ xrCreateSpatialAnchorSpaceMSFT ] --- - - public static int nxrCreateSpatialAnchorSpaceMSFT(XrSession session, long createInfo, long space) { - long __functionAddress = session.getCapabilities().xrCreateSpatialAnchorSpaceMSFT; - if (CHECKS) { - check(__functionAddress); - XrSpatialAnchorSpaceCreateInfoMSFT.validate(createInfo); - } - return callPPPI(session.address(), createInfo, space, __functionAddress); - } - - @NativeType("XrResult") - public static int xrCreateSpatialAnchorSpaceMSFT(XrSession session, @NativeType("XrSpatialAnchorSpaceCreateInfoMSFT const *") XrSpatialAnchorSpaceCreateInfoMSFT createInfo, @NativeType("XrSpace *") PointerBuffer space) { - if (CHECKS) { - check(space, 1); - } - return nxrCreateSpatialAnchorSpaceMSFT(session, createInfo.address(), memAddress(space)); - } - - // --- [ xrDestroySpatialAnchorMSFT ] --- - - @NativeType("XrResult") - public static int xrDestroySpatialAnchorMSFT(XrSpatialAnchorMSFT anchor) { - long __functionAddress = anchor.getCapabilities().xrDestroySpatialAnchorMSFT; - if (CHECKS) { - check(__functionAddress); - } - return callPI(anchor.address(), __functionAddress); - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/MSFTSpatialAnchorPersistence.java b/mcxr-play/src/main/java/org/lwjgl/openxr/MSFTSpatialAnchorPersistence.java deleted file mode 100644 index ef95217b..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/MSFTSpatialAnchorPersistence.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.PointerBuffer; -import org.lwjgl.system.NativeType; - -import java.nio.IntBuffer; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.memAddress; -import static org.lwjgl.system.MemoryUtil.memAddressSafe; - -/** The MSFT_spatial_anchor_persistence extension. */ -public class MSFTSpatialAnchorPersistence { - - /** The extension specification version. */ - public static final int XR_MSFT_spatial_anchor_persistence_SPEC_VERSION = 2; - - /** The extension name. */ - public static final String XR_MSFT_SPATIAL_ANCHOR_PERSISTENCE_EXTENSION_NAME = "XR_MSFT_spatial_anchor_persistence"; - - /** Extends {@code XrObjectType}. */ - public static final int XR_OBJECT_TYPE_SPATIAL_ANCHOR_STORE_CONNECTION_MSFT = 1000142000; - - /** - * Extends {@code XrStructureType}. - * - *
Enum values:
- * - *
    - *
  • {@link #XR_TYPE_SPATIAL_ANCHOR_PERSISTENCE_INFO_MSFT TYPE_SPATIAL_ANCHOR_PERSISTENCE_INFO_MSFT}
  • - *
  • {@link #XR_TYPE_SPATIAL_ANCHOR_FROM_PERSISTED_ANCHOR_CREATE_INFO_MSFT TYPE_SPATIAL_ANCHOR_FROM_PERSISTED_ANCHOR_CREATE_INFO_MSFT}
  • - *
- */ - public static final int - XR_TYPE_SPATIAL_ANCHOR_PERSISTENCE_INFO_MSFT = 1000142000, - XR_TYPE_SPATIAL_ANCHOR_FROM_PERSISTED_ANCHOR_CREATE_INFO_MSFT = 1000142001; - - /** - * Extends {@code XrResult}. - * - *
Enum values:
- * - *
    - *
  • {@link #XR_ERROR_SPATIAL_ANCHOR_NAME_NOT_FOUND_MSFT ERROR_SPATIAL_ANCHOR_NAME_NOT_FOUND_MSFT}
  • - *
  • {@link #XR_ERROR_SPATIAL_ANCHOR_NAME_INVALID_MSFT ERROR_SPATIAL_ANCHOR_NAME_INVALID_MSFT}
  • - *
- */ - public static final int - XR_ERROR_SPATIAL_ANCHOR_NAME_NOT_FOUND_MSFT = -1000142001, - XR_ERROR_SPATIAL_ANCHOR_NAME_INVALID_MSFT = -1000142002; - - /** XR_MAX_SPATIAL_ANCHOR_NAME_SIZE_MSFT */ - public static final int XR_MAX_SPATIAL_ANCHOR_NAME_SIZE_MSFT = 256; - - protected MSFTSpatialAnchorPersistence() { - throw new UnsupportedOperationException(); - } - - // --- [ xrCreateSpatialAnchorStoreConnectionMSFT ] --- - - public static int nxrCreateSpatialAnchorStoreConnectionMSFT(XrSession session, long spatialAnchorStore) { - long __functionAddress = session.getCapabilities().xrCreateSpatialAnchorStoreConnectionMSFT; - if (CHECKS) { - check(__functionAddress); - } - return callPPI(session.address(), spatialAnchorStore, __functionAddress); - } - - @NativeType("XrResult") - public static int xrCreateSpatialAnchorStoreConnectionMSFT(XrSession session, @NativeType("XrSpatialAnchorStoreConnectionMSFT *") PointerBuffer spatialAnchorStore) { - if (CHECKS) { - check(spatialAnchorStore, 1); - } - return nxrCreateSpatialAnchorStoreConnectionMSFT(session, memAddress(spatialAnchorStore)); - } - - // --- [ xrDestroySpatialAnchorStoreConnectionMSFT ] --- - - @NativeType("XrResult") - public static int xrDestroySpatialAnchorStoreConnectionMSFT(XrSpatialAnchorStoreConnectionMSFT spatialAnchorStore) { - long __functionAddress = spatialAnchorStore.getCapabilities().xrDestroySpatialAnchorStoreConnectionMSFT; - if (CHECKS) { - check(__functionAddress); - } - return callPI(spatialAnchorStore.address(), __functionAddress); - } - - // --- [ xrPersistSpatialAnchorMSFT ] --- - - public static int nxrPersistSpatialAnchorMSFT(XrSpatialAnchorStoreConnectionMSFT spatialAnchorStore, long spatialAnchorPersistenceInfo) { - long __functionAddress = spatialAnchorStore.getCapabilities().xrPersistSpatialAnchorMSFT; - if (CHECKS) { - check(__functionAddress); - XrSpatialAnchorPersistenceInfoMSFT.validate(spatialAnchorPersistenceInfo); - } - return callPPI(spatialAnchorStore.address(), spatialAnchorPersistenceInfo, __functionAddress); - } - - @NativeType("XrResult") - public static int xrPersistSpatialAnchorMSFT(XrSpatialAnchorStoreConnectionMSFT spatialAnchorStore, @NativeType("XrSpatialAnchorPersistenceInfoMSFT const *") XrSpatialAnchorPersistenceInfoMSFT spatialAnchorPersistenceInfo) { - return nxrPersistSpatialAnchorMSFT(spatialAnchorStore, spatialAnchorPersistenceInfo.address()); - } - - // --- [ xrEnumeratePersistedSpatialAnchorNamesMSFT ] --- - - public static int nxrEnumeratePersistedSpatialAnchorNamesMSFT(XrSpatialAnchorStoreConnectionMSFT spatialAnchorStore, int spatialAnchorNamesCapacityInput, long spatialAnchorNamesCountOutput, long persistedAnchorNames) { - long __functionAddress = spatialAnchorStore.getCapabilities().xrEnumeratePersistedSpatialAnchorNamesMSFT; - if (CHECKS) { - check(__functionAddress); - } - return callPPPI(spatialAnchorStore.address(), spatialAnchorNamesCapacityInput, spatialAnchorNamesCountOutput, persistedAnchorNames, __functionAddress); - } - - @NativeType("XrResult") - public static int xrEnumeratePersistedSpatialAnchorNamesMSFT(XrSpatialAnchorStoreConnectionMSFT spatialAnchorStore, @Nullable @NativeType("uint32_t *") IntBuffer spatialAnchorNamesCountOutput, @Nullable @NativeType("XrSpatialAnchorPersistenceNameMSFT *") XrSpatialAnchorPersistenceNameMSFT.Buffer persistedAnchorNames) { - if (CHECKS) { - checkSafe(spatialAnchorNamesCountOutput, 1); - } - return nxrEnumeratePersistedSpatialAnchorNamesMSFT(spatialAnchorStore, remainingSafe(persistedAnchorNames), memAddressSafe(spatialAnchorNamesCountOutput), memAddressSafe(persistedAnchorNames)); - } - - // --- [ xrCreateSpatialAnchorFromPersistedNameMSFT ] --- - - public static int nxrCreateSpatialAnchorFromPersistedNameMSFT(XrSession session, long spatialAnchorCreateInfo, long spatialAnchor) { - long __functionAddress = session.getCapabilities().xrCreateSpatialAnchorFromPersistedNameMSFT; - if (CHECKS) { - check(__functionAddress); - XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT.validate(spatialAnchorCreateInfo); - } - return callPPPI(session.address(), spatialAnchorCreateInfo, spatialAnchor, __functionAddress); - } - - @NativeType("XrResult") - public static int xrCreateSpatialAnchorFromPersistedNameMSFT(XrSession session, @NativeType("XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT const *") XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT spatialAnchorCreateInfo, @NativeType("XrSpatialAnchorMSFT *") PointerBuffer spatialAnchor) { - if (CHECKS) { - check(spatialAnchor, 1); - } - return nxrCreateSpatialAnchorFromPersistedNameMSFT(session, spatialAnchorCreateInfo.address(), memAddress(spatialAnchor)); - } - - // --- [ xrUnpersistSpatialAnchorMSFT ] --- - - public static int nxrUnpersistSpatialAnchorMSFT(XrSpatialAnchorStoreConnectionMSFT spatialAnchorStore, long spatialAnchorPersistenceName) { - long __functionAddress = spatialAnchorStore.getCapabilities().xrUnpersistSpatialAnchorMSFT; - if (CHECKS) { - check(__functionAddress); - } - return callPPI(spatialAnchorStore.address(), spatialAnchorPersistenceName, __functionAddress); - } - - @NativeType("XrResult") - public static int xrUnpersistSpatialAnchorMSFT(XrSpatialAnchorStoreConnectionMSFT spatialAnchorStore, @NativeType("XrSpatialAnchorPersistenceNameMSFT const *") XrSpatialAnchorPersistenceNameMSFT spatialAnchorPersistenceName) { - return nxrUnpersistSpatialAnchorMSFT(spatialAnchorStore, spatialAnchorPersistenceName.address()); - } - - // --- [ xrClearSpatialAnchorStoreMSFT ] --- - - @NativeType("XrResult") - public static int xrClearSpatialAnchorStoreMSFT(XrSpatialAnchorStoreConnectionMSFT spatialAnchorStore) { - long __functionAddress = spatialAnchorStore.getCapabilities().xrClearSpatialAnchorStoreMSFT; - if (CHECKS) { - check(__functionAddress); - } - return callPI(spatialAnchorStore.address(), __functionAddress); - } - - /** Array version of: {@link #xrEnumeratePersistedSpatialAnchorNamesMSFT EnumeratePersistedSpatialAnchorNamesMSFT} */ -// @NativeType("XrResult") -// public static int xrEnumeratePersistedSpatialAnchorNamesMSFT(XrSpatialAnchorStoreConnectionMSFT spatialAnchorStore, @Nullable @NativeType("uint32_t *") int[] spatialAnchorNamesCountOutput, @Nullable @NativeType("XrSpatialAnchorPersistenceNameMSFT *") XrSpatialAnchorPersistenceNameMSFT.Buffer persistedAnchorNames) { -// long __functionAddress = spatialAnchorStore.getCapabilities().xrEnumeratePersistedSpatialAnchorNamesMSFT; -// if (CHECKS) { -// check(__functionAddress); -// checkSafe(spatialAnchorNamesCountOutput, 1); -// } -// return callPPPI(spatialAnchorStore.address(), remainingSafe(persistedAnchorNames), spatialAnchorNamesCountOutput, memAddressSafe(persistedAnchorNames), __functionAddress); -// } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/MSFTSpatialGraphBridge.java b/mcxr-play/src/main/java/org/lwjgl/openxr/MSFTSpatialGraphBridge.java deleted file mode 100644 index 09891130..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/MSFTSpatialGraphBridge.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.PointerBuffer; -import org.lwjgl.system.NativeType; - -import static org.lwjgl.system.Checks.CHECKS; -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.JNI.callPPPI; -import static org.lwjgl.system.MemoryUtil.memAddress; - -/** The MSFT_spatial_graph_bridge extension. */ -public class MSFTSpatialGraphBridge { - - /** The extension specification version. */ - public static final int XR_MSFT_spatial_graph_bridge_SPEC_VERSION = 1; - - /** The extension name. */ - public static final String XR_MSFT_SPATIAL_GRAPH_BRIDGE_EXTENSION_NAME = "XR_MSFT_spatial_graph_bridge"; - - /** Extends {@code XrStructureType}. */ - public static final int XR_TYPE_SPATIAL_GRAPH_NODE_SPACE_CREATE_INFO_MSFT = 1000049000; - - /** - * XrSpatialGraphNodeTypeMSFT - * - *
Enum values:
- * - *
    - *
  • {@link #XR_SPATIAL_GRAPH_NODE_TYPE_STATIC_MSFT SPATIAL_GRAPH_NODE_TYPE_STATIC_MSFT}
  • - *
  • {@link #XR_SPATIAL_GRAPH_NODE_TYPE_DYNAMIC_MSFT SPATIAL_GRAPH_NODE_TYPE_DYNAMIC_MSFT}
  • - *
- */ - public static final int - XR_SPATIAL_GRAPH_NODE_TYPE_STATIC_MSFT = 1, - XR_SPATIAL_GRAPH_NODE_TYPE_DYNAMIC_MSFT = 2; - - protected MSFTSpatialGraphBridge() { - throw new UnsupportedOperationException(); - } - - // --- [ xrCreateSpatialGraphNodeSpaceMSFT ] --- - - public static int nxrCreateSpatialGraphNodeSpaceMSFT(XrSession session, long createInfo, long space) { - long __functionAddress = session.getCapabilities().xrCreateSpatialGraphNodeSpaceMSFT; - if (CHECKS) { - check(__functionAddress); - } - return callPPPI(session.address(), createInfo, space, __functionAddress); - } - - @NativeType("XrResult") - public static int xrCreateSpatialGraphNodeSpaceMSFT(XrSession session, @NativeType("XrSpatialGraphNodeSpaceCreateInfoMSFT const *") XrSpatialGraphNodeSpaceCreateInfoMSFT createInfo, @NativeType("XrSpace *") PointerBuffer space) { - if (CHECKS) { - check(space, 1); - } - return nxrCreateSpatialGraphNodeSpaceMSFT(session, createInfo.address(), memAddress(space)); - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/MSFTUnboundedReferenceSpace.java b/mcxr-play/src/main/java/org/lwjgl/openxr/MSFTUnboundedReferenceSpace.java deleted file mode 100644 index 0f83158b..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/MSFTUnboundedReferenceSpace.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -/** The MSFT_unbounded_reference_space extension. */ -public final class MSFTUnboundedReferenceSpace { - - /** The extension specification version. */ - public static final int XR_MSFT_unbounded_reference_space_SPEC_VERSION = 1; - - /** The extension name. */ - public static final String XR_MSFT_UNBOUNDED_REFERENCE_SPACE_EXTENSION_NAME = "XR_MSFT_unbounded_reference_space"; - - /** Extends {@code XrReferenceSpaceType}. */ - public static final int XR_REFERENCE_SPACE_TYPE_UNBOUNDED_MSFT = 1000038000; - - private MSFTUnboundedReferenceSpace() {} - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/OCULUSAndroidSessionStateEnable.java b/mcxr-play/src/main/java/org/lwjgl/openxr/OCULUSAndroidSessionStateEnable.java deleted file mode 100644 index 67476ea6..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/OCULUSAndroidSessionStateEnable.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -/** The OCULUS_android_session_state_enable extension. */ -public final class OCULUSAndroidSessionStateEnable { - - /** The extension specification version. */ - public static final int XR_OCULUS_android_session_state_enable_SPEC_VERSION = 1; - - /** The extension name. */ - public static final String XR_OCULUS_ANDROID_SESSION_STATE_ENABLE_EXTENSION_NAME = "XR_OCULUS_android_session_state_enable"; - - private OCULUSAndroidSessionStateEnable() {} - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/OCULUSAudioDeviceGuid.java b/mcxr-play/src/main/java/org/lwjgl/openxr/OCULUSAudioDeviceGuid.java deleted file mode 100644 index 69c45e68..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/OCULUSAudioDeviceGuid.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.system.NativeType; - -import java.nio.IntBuffer; - -import static org.lwjgl.system.Checks.CHECKS; -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.JNI.callPPI; -import static org.lwjgl.system.MemoryUtil.memAddress; - -/** The OCULUS_audio_device_guid extension. */ -public class OCULUSAudioDeviceGuid { - - /** The extension specification version. */ - public static final int XR_OCULUS_audio_device_guid_SPEC_VERSION = 1; - - /** The extension name. */ - public static final String XR_OCULUS_AUDIO_DEVICE_GUID_EXTENSION_NAME = "XR_OCULUS_audio_device_guid"; - - /** XR_MAX_AUDIO_DEVICE_STR_SIZE_OCULUS */ - public static final int XR_MAX_AUDIO_DEVICE_STR_SIZE_OCULUS = 128; - - protected OCULUSAudioDeviceGuid() { - throw new UnsupportedOperationException(); - } - - // --- [ xrGetAudioOutputDeviceGuidOculus ] --- - - public static int nxrGetAudioOutputDeviceGuidOculus(XrInstance instance, long buffer) { - long __functionAddress = instance.getCapabilities().xrGetAudioOutputDeviceGuidOculus; - if (CHECKS) { - check(__functionAddress); - } - return callPPI(instance.address(), buffer, __functionAddress); - } - - @NativeType("XrResult") - public static int xrGetAudioOutputDeviceGuidOculus(XrInstance instance, @NativeType("wchar *") IntBuffer buffer) { - if (CHECKS) { - check(buffer, XR_MAX_AUDIO_DEVICE_STR_SIZE_OCULUS); - } - return nxrGetAudioOutputDeviceGuidOculus(instance, memAddress(buffer)); - } - - // --- [ xrGetAudioInputDeviceGuidOculus ] --- - - public static int nxrGetAudioInputDeviceGuidOculus(XrInstance instance, long buffer) { - long __functionAddress = instance.getCapabilities().xrGetAudioInputDeviceGuidOculus; - if (CHECKS) { - check(__functionAddress); - } - return callPPI(instance.address(), buffer, __functionAddress); - } - - @NativeType("XrResult") - public static int xrGetAudioInputDeviceGuidOculus(XrInstance instance, @NativeType("wchar *") IntBuffer buffer) { - if (CHECKS) { - check(buffer, XR_MAX_AUDIO_DEVICE_STR_SIZE_OCULUS); - } - return nxrGetAudioInputDeviceGuidOculus(instance, memAddress(buffer)); - } - - /** Array version of: {@link #xrGetAudioOutputDeviceGuidOculus GetAudioOutputDeviceGuidOculus} */ - @NativeType("XrResult") - public static int xrGetAudioOutputDeviceGuidOculus(XrInstance instance, @NativeType("wchar *") int[] buffer) { - long __functionAddress = instance.getCapabilities().xrGetAudioOutputDeviceGuidOculus; - if (CHECKS) { - check(__functionAddress); - check(buffer, XR_MAX_AUDIO_DEVICE_STR_SIZE_OCULUS); - } - return callPPI(instance.address(), buffer, __functionAddress); - } - - /** Array version of: {@link #xrGetAudioInputDeviceGuidOculus GetAudioInputDeviceGuidOculus} */ - @NativeType("XrResult") - public static int xrGetAudioInputDeviceGuidOculus(XrInstance instance, @NativeType("wchar *") int[] buffer) { - long __functionAddress = instance.getCapabilities().xrGetAudioInputDeviceGuidOculus; - if (CHECKS) { - check(__functionAddress); - check(buffer, XR_MAX_AUDIO_DEVICE_STR_SIZE_OCULUS); - } - return callPPI(instance.address(), buffer, __functionAddress); - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/VALVEAnalogThreshold.java b/mcxr-play/src/main/java/org/lwjgl/openxr/VALVEAnalogThreshold.java deleted file mode 100644 index 28eeb701..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/VALVEAnalogThreshold.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -/** The VALVE_analog_threshold extension. */ -public final class VALVEAnalogThreshold { - - /** The extension specification version. */ - public static final int XR_VALVE_analog_threshold_SPEC_VERSION = 2; - - /** The extension name. */ - public static final String XR_VALVE_ANALOG_THRESHOLD_EXTENSION_NAME = "XR_VALVE_analog_threshold"; - - /** Extends {@code XrStructureType}. */ - public static final int XR_TYPE_INTERACTION_PROFILE_ANALOG_THRESHOLD_VALVE = 1000079000; - - private VALVEAnalogThreshold() {} - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/VARJOCompositionLayerDepthTest.java b/mcxr-play/src/main/java/org/lwjgl/openxr/VARJOCompositionLayerDepthTest.java deleted file mode 100644 index cadafeb2..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/VARJOCompositionLayerDepthTest.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -/** The VARJO_composition_layer_depth_test extension. */ -public final class VARJOCompositionLayerDepthTest { - - /** The extension specification version. */ - public static final int XR_VARJO_composition_layer_depth_test_SPEC_VERSION = 2; - - /** The extension name. */ - public static final String XR_VARJO_COMPOSITION_LAYER_DEPTH_TEST_EXTENSION_NAME = "XR_VARJO_composition_layer_depth_test"; - - /** Extends {@code XrStructureType}. */ - public static final int XR_TYPE_COMPOSITION_LAYER_DEPTH_TEST_VARJO = 1000122000; - - private VARJOCompositionLayerDepthTest() {} - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/VARJOEnvironmentDepthEstimation.java b/mcxr-play/src/main/java/org/lwjgl/openxr/VARJOEnvironmentDepthEstimation.java deleted file mode 100644 index 4598ea43..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/VARJOEnvironmentDepthEstimation.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.system.NativeType; - -import static org.lwjgl.system.Checks.CHECKS; -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.JNI.callPI; - -/** The VARJO_environment_depth_estimation extension. */ -public class VARJOEnvironmentDepthEstimation { - - /** The extension specification version. */ - public static final int XR_VARJO_environment_depth_estimation_SPEC_VERSION = 1; - - /** The extension name. */ - public static final String XR_VARJO_ENVIRONMENT_DEPTH_ESTIMATION_EXTENSION_NAME = "XR_VARJO_environment_depth_estimation"; - - protected VARJOEnvironmentDepthEstimation() { - throw new UnsupportedOperationException(); - } - - // --- [ xrSetEnvironmentDepthEstimationVARJO ] --- - - @NativeType("XrResult") - public static int xrSetEnvironmentDepthEstimationVARJO(XrSession session, @NativeType("XrBool32") boolean enabled) { - long __functionAddress = session.getCapabilities().xrSetEnvironmentDepthEstimationVARJO; - if (CHECKS) { - check(__functionAddress); - } - return callPI(session.address(), enabled ? 1 : 0, __functionAddress); - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/VARJOFoveatedRendering.java b/mcxr-play/src/main/java/org/lwjgl/openxr/VARJOFoveatedRendering.java deleted file mode 100644 index 7bd9cdc4..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/VARJOFoveatedRendering.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -/** The VARJO_foveated_rendering extension. */ -public final class VARJOFoveatedRendering { - - /** The extension specification version. */ - public static final int XR_VARJO_foveated_rendering_SPEC_VERSION = 2; - - /** The extension name. */ - public static final String XR_VARJO_FOVEATED_RENDERING_EXTENSION_NAME = "XR_VARJO_foveated_rendering"; - - /** - * Extends {@code XrStructureType}. - * - *
Enum values:
- * - *
    - *
  • {@link #XR_TYPE_VIEW_LOCATE_FOVEATED_RENDERING_VARJO TYPE_VIEW_LOCATE_FOVEATED_RENDERING_VARJO}
  • - *
  • {@link #XR_TYPE_FOVEATED_VIEW_CONFIGURATION_VIEW_VARJO TYPE_FOVEATED_VIEW_CONFIGURATION_VIEW_VARJO}
  • - *
  • {@link #XR_TYPE_SYSTEM_FOVEATED_RENDERING_PROPERTIES_VARJO TYPE_SYSTEM_FOVEATED_RENDERING_PROPERTIES_VARJO}
  • - *
- */ - public static final int - XR_TYPE_VIEW_LOCATE_FOVEATED_RENDERING_VARJO = 1000121000, - XR_TYPE_FOVEATED_VIEW_CONFIGURATION_VIEW_VARJO = 1000121001, - XR_TYPE_SYSTEM_FOVEATED_RENDERING_PROPERTIES_VARJO = 1000121002; - - /** Extends {@code XrReferenceSpaceType}. */ - public static final int XR_REFERENCE_SPACE_TYPE_COMBINED_EYE_VARJO = 1000121000; - - private VARJOFoveatedRendering() {} - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/VARJOMarkerTracking.java b/mcxr-play/src/main/java/org/lwjgl/openxr/VARJOMarkerTracking.java deleted file mode 100644 index ad55cd4f..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/VARJOMarkerTracking.java +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.PointerBuffer; -import org.lwjgl.system.NativeType; - -import static org.lwjgl.system.Checks.CHECKS; -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.memAddress; - -/** The VARJO_marker_tracking extension. */ -public class VARJOMarkerTracking { - - /** The extension specification version. */ - public static final int XR_VARJO_marker_tracking_SPEC_VERSION = 1; - - /** The extension name. */ - public static final String XR_VARJO_MARKER_TRACKING_EXTENSION_NAME = "XR_VARJO_marker_tracking"; - - /** - * Extends {@code XrStructureType}. - * - *
Enum values:
- * - *
    - *
  • {@link #XR_TYPE_SYSTEM_MARKER_TRACKING_PROPERTIES_VARJO TYPE_SYSTEM_MARKER_TRACKING_PROPERTIES_VARJO}
  • - *
  • {@link #XR_TYPE_EVENT_DATA_MARKER_TRACKING_UPDATE_VARJO TYPE_EVENT_DATA_MARKER_TRACKING_UPDATE_VARJO}
  • - *
  • {@link #XR_TYPE_MARKER_SPACE_CREATE_INFO_VARJO TYPE_MARKER_SPACE_CREATE_INFO_VARJO}
  • - *
- */ - public static final int - XR_TYPE_SYSTEM_MARKER_TRACKING_PROPERTIES_VARJO = 1000124000, - XR_TYPE_EVENT_DATA_MARKER_TRACKING_UPDATE_VARJO = 1000124001, - XR_TYPE_MARKER_SPACE_CREATE_INFO_VARJO = 1000124002; - - /** - * Extends {@code XrResult}. - * - *
Enum values:
- * - *
    - *
  • {@link #XR_ERROR_MARKER_NOT_TRACKED_VARJO ERROR_MARKER_NOT_TRACKED_VARJO}
  • - *
  • {@link #XR_ERROR_MARKER_ID_INVALID_VARJO ERROR_MARKER_ID_INVALID_VARJO}
  • - *
- */ - public static final int - XR_ERROR_MARKER_NOT_TRACKED_VARJO = -1000124000, - XR_ERROR_MARKER_ID_INVALID_VARJO = -1000124001; - - protected VARJOMarkerTracking() { - throw new UnsupportedOperationException(); - } - - // --- [ xrSetMarkerTrackingVARJO ] --- - - @NativeType("XrResult") - public static int xrSetMarkerTrackingVARJO(XrSession session, @NativeType("XrBool32") boolean enabled) { - long __functionAddress = session.getCapabilities().xrSetMarkerTrackingVARJO; - if (CHECKS) { - check(__functionAddress); - } - return callPI(session.address(), enabled ? 1 : 0, __functionAddress); - } - - // --- [ xrSetMarkerTrackingTimeoutVARJO ] --- - -// @NativeType("XrResult") -// public static int xrSetMarkerTrackingTimeoutVARJO(XrSession session, @NativeType("uint64_t") long markerId, @NativeType("XrDuration") long timeout) { -// long __functionAddress = session.getCapabilities().xrSetMarkerTrackingTimeoutVARJO; -// if (CHECKS) { -// check(__functionAddress); -// } -// return callPJJI(session.address(), markerId, timeout, __functionAddress); -// } - - // --- [ xrSetMarkerTrackingPredictionVARJO ] --- - - @NativeType("XrResult") - public static int xrSetMarkerTrackingPredictionVARJO(XrSession session, @NativeType("uint64_t") long markerId, @NativeType("XrBool32") boolean enabled) { - long __functionAddress = session.getCapabilities().xrSetMarkerTrackingPredictionVARJO; - if (CHECKS) { - check(__functionAddress); - } - return callPJI(session.address(), markerId, enabled ? 1 : 0, __functionAddress); - } - - // --- [ xrGetMarkerSizeVARJO ] --- - - public static int nxrGetMarkerSizeVARJO(XrSession session, long markerId, long size) { - long __functionAddress = session.getCapabilities().xrGetMarkerSizeVARJO; - if (CHECKS) { - check(__functionAddress); - } - return callPJPI(session.address(), markerId, size, __functionAddress); - } - - @NativeType("XrResult") - public static int xrGetMarkerSizeVARJO(XrSession session, @NativeType("uint64_t") long markerId, @NativeType("XrExtent2Df *") XrExtent2Df size) { - return nxrGetMarkerSizeVARJO(session, markerId, size.address()); - } - - // --- [ xrCreateMarkerSpaceVARJO ] --- - - public static int nxrCreateMarkerSpaceVARJO(XrSession session, long createInfo, long space) { - long __functionAddress = session.getCapabilities().xrCreateMarkerSpaceVARJO; - if (CHECKS) { - check(__functionAddress); - } - return callPPPI(session.address(), createInfo, space, __functionAddress); - } - - @NativeType("XrResult") - public static int xrCreateMarkerSpaceVARJO(XrSession session, @NativeType("XrMarkerSpaceCreateInfoVARJO const *") XrMarkerSpaceCreateInfoVARJO createInfo, @NativeType("XrSpace *") PointerBuffer space) { - if (CHECKS) { - check(space, 1); - } - return nxrCreateMarkerSpaceVARJO(session, createInfo.address(), memAddress(space)); - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/VARJOQuadViews.java b/mcxr-play/src/main/java/org/lwjgl/openxr/VARJOQuadViews.java deleted file mode 100644 index a0099bbf..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/VARJOQuadViews.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -/** The VARJO_quad_views extension. */ -public final class VARJOQuadViews { - - /** The extension specification version. */ - public static final int XR_VARJO_quad_views_SPEC_VERSION = 1; - - /** The extension name. */ - public static final String XR_VARJO_QUAD_VIEWS_EXTENSION_NAME = "XR_VARJO_quad_views"; - - /** Extends {@code XrViewConfigurationType}. */ - public static final int XR_VIEW_CONFIGURATION_TYPE_PRIMARY_QUAD_VARJO = 1000037000; - - private VARJOQuadViews() {} - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XR10.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XR10.java deleted file mode 100644 index d48a2815..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XR10.java +++ /dev/null @@ -1,1602 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.PointerBuffer; -import org.lwjgl.system.MemoryStack; -import org.lwjgl.system.NativeType; - -import java.nio.ByteBuffer; -import java.nio.IntBuffer; -import java.nio.LongBuffer; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.stackGet; -import static org.lwjgl.system.MemoryUtil.*; - -/** The core OpenXR 1.0 functionality. */ -public class XR10 { - - /** - * XrResult - * - *
Enum values:
- * - *
    - *
  • {@link #XR_SUCCESS SUCCESS}
  • - *
  • {@link #XR_TIMEOUT_EXPIRED TIMEOUT_EXPIRED}
  • - *
  • {@link #XR_SESSION_LOSS_PENDING SESSION_LOSS_PENDING}
  • - *
  • {@link #XR_EVENT_UNAVAILABLE EVENT_UNAVAILABLE}
  • - *
  • {@link #XR_SPACE_BOUNDS_UNAVAILABLE SPACE_BOUNDS_UNAVAILABLE}
  • - *
  • {@link #XR_SESSION_NOT_FOCUSED SESSION_NOT_FOCUSED}
  • - *
  • {@link #XR_FRAME_DISCARDED FRAME_DISCARDED}
  • - *
  • {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}
  • - *
  • {@link #XR_ERROR_RUNTIME_FAILURE ERROR_RUNTIME_FAILURE}
  • - *
  • {@link #XR_ERROR_OUT_OF_MEMORY ERROR_OUT_OF_MEMORY}
  • - *
  • {@link #XR_ERROR_API_VERSION_UNSUPPORTED ERROR_API_VERSION_UNSUPPORTED}
  • - *
  • {@link #XR_ERROR_INITIALIZATION_FAILED ERROR_INITIALIZATION_FAILED}
  • - *
  • {@link #XR_ERROR_FUNCTION_UNSUPPORTED ERROR_FUNCTION_UNSUPPORTED}
  • - *
  • {@link #XR_ERROR_FEATURE_UNSUPPORTED ERROR_FEATURE_UNSUPPORTED}
  • - *
  • {@link #XR_ERROR_EXTENSION_NOT_PRESENT ERROR_EXTENSION_NOT_PRESENT}
  • - *
  • {@link #XR_ERROR_LIMIT_REACHED ERROR_LIMIT_REACHED}
  • - *
  • {@link #XR_ERROR_SIZE_INSUFFICIENT ERROR_SIZE_INSUFFICIENT}
  • - *
  • {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
  • - *
  • {@link #XR_ERROR_INSTANCE_LOST ERROR_INSTANCE_LOST}
  • - *
  • {@link #XR_ERROR_SESSION_RUNNING ERROR_SESSION_RUNNING}
  • - *
  • {@link #XR_ERROR_SESSION_NOT_RUNNING ERROR_SESSION_NOT_RUNNING}
  • - *
  • {@link #XR_ERROR_SESSION_LOST ERROR_SESSION_LOST}
  • - *
  • {@link #XR_ERROR_SYSTEM_INVALID ERROR_SYSTEM_INVALID}
  • - *
  • {@link #XR_ERROR_PATH_INVALID ERROR_PATH_INVALID}
  • - *
  • {@link #XR_ERROR_PATH_COUNT_EXCEEDED ERROR_PATH_COUNT_EXCEEDED}
  • - *
  • {@link #XR_ERROR_PATH_FORMAT_INVALID ERROR_PATH_FORMAT_INVALID}
  • - *
  • {@link #XR_ERROR_PATH_UNSUPPORTED ERROR_PATH_UNSUPPORTED}
  • - *
  • {@link #XR_ERROR_LAYER_INVALID ERROR_LAYER_INVALID}
  • - *
  • {@link #XR_ERROR_LAYER_LIMIT_EXCEEDED ERROR_LAYER_LIMIT_EXCEEDED}
  • - *
  • {@link #XR_ERROR_SWAPCHAIN_RECT_INVALID ERROR_SWAPCHAIN_RECT_INVALID}
  • - *
  • {@link #XR_ERROR_SWAPCHAIN_FORMAT_UNSUPPORTED ERROR_SWAPCHAIN_FORMAT_UNSUPPORTED}
  • - *
  • {@link #XR_ERROR_ACTION_TYPE_MISMATCH ERROR_ACTION_TYPE_MISMATCH}
  • - *
  • {@link #XR_ERROR_SESSION_NOT_READY ERROR_SESSION_NOT_READY}
  • - *
  • {@link #XR_ERROR_SESSION_NOT_STOPPING ERROR_SESSION_NOT_STOPPING}
  • - *
  • {@link #XR_ERROR_TIME_INVALID ERROR_TIME_INVALID}
  • - *
  • {@link #XR_ERROR_REFERENCE_SPACE_UNSUPPORTED ERROR_REFERENCE_SPACE_UNSUPPORTED}
  • - *
  • {@link #XR_ERROR_FILE_ACCESS_ERROR ERROR_FILE_ACCESS_ERROR}
  • - *
  • {@link #XR_ERROR_FILE_CONTENTS_INVALID ERROR_FILE_CONTENTS_INVALID}
  • - *
  • {@link #XR_ERROR_FORM_FACTOR_UNSUPPORTED ERROR_FORM_FACTOR_UNSUPPORTED}
  • - *
  • {@link #XR_ERROR_FORM_FACTOR_UNAVAILABLE ERROR_FORM_FACTOR_UNAVAILABLE}
  • - *
  • {@link #XR_ERROR_API_LAYER_NOT_PRESENT ERROR_API_LAYER_NOT_PRESENT}
  • - *
  • {@link #XR_ERROR_CALL_ORDER_INVALID ERROR_CALL_ORDER_INVALID}
  • - *
  • {@link #XR_ERROR_GRAPHICS_DEVICE_INVALID ERROR_GRAPHICS_DEVICE_INVALID}
  • - *
  • {@link #XR_ERROR_POSE_INVALID ERROR_POSE_INVALID}
  • - *
  • {@link #XR_ERROR_INDEX_OUT_OF_RANGE ERROR_INDEX_OUT_OF_RANGE}
  • - *
  • {@link #XR_ERROR_VIEW_CONFIGURATION_TYPE_UNSUPPORTED ERROR_VIEW_CONFIGURATION_TYPE_UNSUPPORTED}
  • - *
  • {@link #XR_ERROR_ENVIRONMENT_BLEND_MODE_UNSUPPORTED ERROR_ENVIRONMENT_BLEND_MODE_UNSUPPORTED}
  • - *
  • {@link #XR_ERROR_NAME_DUPLICATED ERROR_NAME_DUPLICATED}
  • - *
  • {@link #XR_ERROR_NAME_INVALID ERROR_NAME_INVALID}
  • - *
  • {@link #XR_ERROR_ACTIONSET_NOT_ATTACHED ERROR_ACTIONSET_NOT_ATTACHED}
  • - *
  • {@link #XR_ERROR_ACTIONSETS_ALREADY_ATTACHED ERROR_ACTIONSETS_ALREADY_ATTACHED}
  • - *
  • {@link #XR_ERROR_LOCALIZED_NAME_DUPLICATED ERROR_LOCALIZED_NAME_DUPLICATED}
  • - *
  • {@link #XR_ERROR_LOCALIZED_NAME_INVALID ERROR_LOCALIZED_NAME_INVALID}
  • - *
  • {@link #XR_ERROR_GRAPHICS_REQUIREMENTS_CALL_MISSING ERROR_GRAPHICS_REQUIREMENTS_CALL_MISSING}
  • - *
  • {@link #XR_ERROR_RUNTIME_UNAVAILABLE ERROR_RUNTIME_UNAVAILABLE}
  • - *
- */ - public static final int - XR_SUCCESS = 0, - XR_TIMEOUT_EXPIRED = 1, - XR_SESSION_LOSS_PENDING = 3, - XR_EVENT_UNAVAILABLE = 4, - XR_SPACE_BOUNDS_UNAVAILABLE = 7, - XR_SESSION_NOT_FOCUSED = 8, - XR_FRAME_DISCARDED = 9, - XR_ERROR_VALIDATION_FAILURE = -1, - XR_ERROR_RUNTIME_FAILURE = -2, - XR_ERROR_OUT_OF_MEMORY = -3, - XR_ERROR_API_VERSION_UNSUPPORTED = -4, - XR_ERROR_INITIALIZATION_FAILED = -6, - XR_ERROR_FUNCTION_UNSUPPORTED = -7, - XR_ERROR_FEATURE_UNSUPPORTED = -8, - XR_ERROR_EXTENSION_NOT_PRESENT = -9, - XR_ERROR_LIMIT_REACHED = -10, - XR_ERROR_SIZE_INSUFFICIENT = -11, - XR_ERROR_HANDLE_INVALID = -12, - XR_ERROR_INSTANCE_LOST = -13, - XR_ERROR_SESSION_RUNNING = -14, - XR_ERROR_SESSION_NOT_RUNNING = -16, - XR_ERROR_SESSION_LOST = -17, - XR_ERROR_SYSTEM_INVALID = -18, - XR_ERROR_PATH_INVALID = -19, - XR_ERROR_PATH_COUNT_EXCEEDED = -20, - XR_ERROR_PATH_FORMAT_INVALID = -21, - XR_ERROR_PATH_UNSUPPORTED = -22, - XR_ERROR_LAYER_INVALID = -23, - XR_ERROR_LAYER_LIMIT_EXCEEDED = -24, - XR_ERROR_SWAPCHAIN_RECT_INVALID = -25, - XR_ERROR_SWAPCHAIN_FORMAT_UNSUPPORTED = -26, - XR_ERROR_ACTION_TYPE_MISMATCH = -27, - XR_ERROR_SESSION_NOT_READY = -28, - XR_ERROR_SESSION_NOT_STOPPING = -29, - XR_ERROR_TIME_INVALID = -30, - XR_ERROR_REFERENCE_SPACE_UNSUPPORTED = -31, - XR_ERROR_FILE_ACCESS_ERROR = -32, - XR_ERROR_FILE_CONTENTS_INVALID = -33, - XR_ERROR_FORM_FACTOR_UNSUPPORTED = -34, - XR_ERROR_FORM_FACTOR_UNAVAILABLE = -35, - XR_ERROR_API_LAYER_NOT_PRESENT = -36, - XR_ERROR_CALL_ORDER_INVALID = -37, - XR_ERROR_GRAPHICS_DEVICE_INVALID = -38, - XR_ERROR_POSE_INVALID = -39, - XR_ERROR_INDEX_OUT_OF_RANGE = -40, - XR_ERROR_VIEW_CONFIGURATION_TYPE_UNSUPPORTED = -41, - XR_ERROR_ENVIRONMENT_BLEND_MODE_UNSUPPORTED = -42, - XR_ERROR_NAME_DUPLICATED = -44, - XR_ERROR_NAME_INVALID = -45, - XR_ERROR_ACTIONSET_NOT_ATTACHED = -46, - XR_ERROR_ACTIONSETS_ALREADY_ATTACHED = -47, - XR_ERROR_LOCALIZED_NAME_DUPLICATED = -48, - XR_ERROR_LOCALIZED_NAME_INVALID = -49, - XR_ERROR_GRAPHICS_REQUIREMENTS_CALL_MISSING = -50, - XR_ERROR_RUNTIME_UNAVAILABLE = -51; - - /** - * XrStructureType - * - *
Enum values:
- * - *
    - *
  • {@link #XR_TYPE_UNKNOWN TYPE_UNKNOWN}
  • - *
  • {@link #XR_TYPE_API_LAYER_PROPERTIES TYPE_API_LAYER_PROPERTIES}
  • - *
  • {@link #XR_TYPE_EXTENSION_PROPERTIES TYPE_EXTENSION_PROPERTIES}
  • - *
  • {@link #XR_TYPE_INSTANCE_CREATE_INFO TYPE_INSTANCE_CREATE_INFO}
  • - *
  • {@link #XR_TYPE_SYSTEM_GET_INFO TYPE_SYSTEM_GET_INFO}
  • - *
  • {@link #XR_TYPE_SYSTEM_PROPERTIES TYPE_SYSTEM_PROPERTIES}
  • - *
  • {@link #XR_TYPE_VIEW_LOCATE_INFO TYPE_VIEW_LOCATE_INFO}
  • - *
  • {@link #XR_TYPE_VIEW TYPE_VIEW}
  • - *
  • {@link #XR_TYPE_SESSION_CREATE_INFO TYPE_SESSION_CREATE_INFO}
  • - *
  • {@link #XR_TYPE_SWAPCHAIN_CREATE_INFO TYPE_SWAPCHAIN_CREATE_INFO}
  • - *
  • {@link #XR_TYPE_SESSION_BEGIN_INFO TYPE_SESSION_BEGIN_INFO}
  • - *
  • {@link #XR_TYPE_VIEW_STATE TYPE_VIEW_STATE}
  • - *
  • {@link #XR_TYPE_FRAME_END_INFO TYPE_FRAME_END_INFO}
  • - *
  • {@link #XR_TYPE_HAPTIC_VIBRATION TYPE_HAPTIC_VIBRATION}
  • - *
  • {@link #XR_TYPE_EVENT_DATA_BUFFER TYPE_EVENT_DATA_BUFFER}
  • - *
  • {@link #XR_TYPE_EVENT_DATA_INSTANCE_LOSS_PENDING TYPE_EVENT_DATA_INSTANCE_LOSS_PENDING}
  • - *
  • {@link #XR_TYPE_EVENT_DATA_SESSION_STATE_CHANGED TYPE_EVENT_DATA_SESSION_STATE_CHANGED}
  • - *
  • {@link #XR_TYPE_ACTION_STATE_BOOLEAN TYPE_ACTION_STATE_BOOLEAN}
  • - *
  • {@link #XR_TYPE_ACTION_STATE_FLOAT TYPE_ACTION_STATE_FLOAT}
  • - *
  • {@link #XR_TYPE_ACTION_STATE_VECTOR2F TYPE_ACTION_STATE_VECTOR2F}
  • - *
  • {@link #XR_TYPE_ACTION_STATE_POSE TYPE_ACTION_STATE_POSE}
  • - *
  • {@link #XR_TYPE_ACTION_SET_CREATE_INFO TYPE_ACTION_SET_CREATE_INFO}
  • - *
  • {@link #XR_TYPE_ACTION_CREATE_INFO TYPE_ACTION_CREATE_INFO}
  • - *
  • {@link #XR_TYPE_INSTANCE_PROPERTIES TYPE_INSTANCE_PROPERTIES}
  • - *
  • {@link #XR_TYPE_FRAME_WAIT_INFO TYPE_FRAME_WAIT_INFO}
  • - *
  • {@link #XR_TYPE_COMPOSITION_LAYER_PROJECTION TYPE_COMPOSITION_LAYER_PROJECTION}
  • - *
  • {@link #XR_TYPE_COMPOSITION_LAYER_QUAD TYPE_COMPOSITION_LAYER_QUAD}
  • - *
  • {@link #XR_TYPE_REFERENCE_SPACE_CREATE_INFO TYPE_REFERENCE_SPACE_CREATE_INFO}
  • - *
  • {@link #XR_TYPE_ACTION_SPACE_CREATE_INFO TYPE_ACTION_SPACE_CREATE_INFO}
  • - *
  • {@link #XR_TYPE_EVENT_DATA_REFERENCE_SPACE_CHANGE_PENDING TYPE_EVENT_DATA_REFERENCE_SPACE_CHANGE_PENDING}
  • - *
  • {@link #XR_TYPE_VIEW_CONFIGURATION_VIEW TYPE_VIEW_CONFIGURATION_VIEW}
  • - *
  • {@link #XR_TYPE_SPACE_LOCATION TYPE_SPACE_LOCATION}
  • - *
  • {@link #XR_TYPE_SPACE_VELOCITY TYPE_SPACE_VELOCITY}
  • - *
  • {@link #XR_TYPE_FRAME_STATE TYPE_FRAME_STATE}
  • - *
  • {@link #XR_TYPE_VIEW_CONFIGURATION_PROPERTIES TYPE_VIEW_CONFIGURATION_PROPERTIES}
  • - *
  • {@link #XR_TYPE_FRAME_BEGIN_INFO TYPE_FRAME_BEGIN_INFO}
  • - *
  • {@link #XR_TYPE_COMPOSITION_LAYER_PROJECTION_VIEW TYPE_COMPOSITION_LAYER_PROJECTION_VIEW}
  • - *
  • {@link #XR_TYPE_EVENT_DATA_EVENTS_LOST TYPE_EVENT_DATA_EVENTS_LOST}
  • - *
  • {@link #XR_TYPE_INTERACTION_PROFILE_SUGGESTED_BINDING TYPE_INTERACTION_PROFILE_SUGGESTED_BINDING}
  • - *
  • {@link #XR_TYPE_EVENT_DATA_INTERACTION_PROFILE_CHANGED TYPE_EVENT_DATA_INTERACTION_PROFILE_CHANGED}
  • - *
  • {@link #XR_TYPE_INTERACTION_PROFILE_STATE TYPE_INTERACTION_PROFILE_STATE}
  • - *
  • {@link #XR_TYPE_SWAPCHAIN_IMAGE_ACQUIRE_INFO TYPE_SWAPCHAIN_IMAGE_ACQUIRE_INFO}
  • - *
  • {@link #XR_TYPE_SWAPCHAIN_IMAGE_WAIT_INFO TYPE_SWAPCHAIN_IMAGE_WAIT_INFO}
  • - *
  • {@link #XR_TYPE_SWAPCHAIN_IMAGE_RELEASE_INFO TYPE_SWAPCHAIN_IMAGE_RELEASE_INFO}
  • - *
  • {@link #XR_TYPE_ACTION_STATE_GET_INFO TYPE_ACTION_STATE_GET_INFO}
  • - *
  • {@link #XR_TYPE_HAPTIC_ACTION_INFO TYPE_HAPTIC_ACTION_INFO}
  • - *
  • {@link #XR_TYPE_SESSION_ACTION_SETS_ATTACH_INFO TYPE_SESSION_ACTION_SETS_ATTACH_INFO}
  • - *
  • {@link #XR_TYPE_ACTIONS_SYNC_INFO TYPE_ACTIONS_SYNC_INFO}
  • - *
  • {@link #XR_TYPE_BOUND_SOURCES_FOR_ACTION_ENUMERATE_INFO TYPE_BOUND_SOURCES_FOR_ACTION_ENUMERATE_INFO}
  • - *
  • {@link #XR_TYPE_INPUT_SOURCE_LOCALIZED_NAME_GET_INFO TYPE_INPUT_SOURCE_LOCALIZED_NAME_GET_INFO}
  • - *
- */ - public static final int - XR_TYPE_UNKNOWN = 0, - XR_TYPE_API_LAYER_PROPERTIES = 1, - XR_TYPE_EXTENSION_PROPERTIES = 2, - XR_TYPE_INSTANCE_CREATE_INFO = 3, - XR_TYPE_SYSTEM_GET_INFO = 4, - XR_TYPE_SYSTEM_PROPERTIES = 5, - XR_TYPE_VIEW_LOCATE_INFO = 6, - XR_TYPE_VIEW = 7, - XR_TYPE_SESSION_CREATE_INFO = 8, - XR_TYPE_SWAPCHAIN_CREATE_INFO = 9, - XR_TYPE_SESSION_BEGIN_INFO = 10, - XR_TYPE_VIEW_STATE = 11, - XR_TYPE_FRAME_END_INFO = 12, - XR_TYPE_HAPTIC_VIBRATION = 13, - XR_TYPE_EVENT_DATA_BUFFER = 16, - XR_TYPE_EVENT_DATA_INSTANCE_LOSS_PENDING = 17, - XR_TYPE_EVENT_DATA_SESSION_STATE_CHANGED = 18, - XR_TYPE_ACTION_STATE_BOOLEAN = 23, - XR_TYPE_ACTION_STATE_FLOAT = 24, - XR_TYPE_ACTION_STATE_VECTOR2F = 25, - XR_TYPE_ACTION_STATE_POSE = 27, - XR_TYPE_ACTION_SET_CREATE_INFO = 28, - XR_TYPE_ACTION_CREATE_INFO = 29, - XR_TYPE_INSTANCE_PROPERTIES = 32, - XR_TYPE_FRAME_WAIT_INFO = 33, - XR_TYPE_COMPOSITION_LAYER_PROJECTION = 35, - XR_TYPE_COMPOSITION_LAYER_QUAD = 36, - XR_TYPE_REFERENCE_SPACE_CREATE_INFO = 37, - XR_TYPE_ACTION_SPACE_CREATE_INFO = 38, - XR_TYPE_EVENT_DATA_REFERENCE_SPACE_CHANGE_PENDING = 40, - XR_TYPE_VIEW_CONFIGURATION_VIEW = 41, - XR_TYPE_SPACE_LOCATION = 42, - XR_TYPE_SPACE_VELOCITY = 43, - XR_TYPE_FRAME_STATE = 44, - XR_TYPE_VIEW_CONFIGURATION_PROPERTIES = 45, - XR_TYPE_FRAME_BEGIN_INFO = 46, - XR_TYPE_COMPOSITION_LAYER_PROJECTION_VIEW = 48, - XR_TYPE_EVENT_DATA_EVENTS_LOST = 49, - XR_TYPE_INTERACTION_PROFILE_SUGGESTED_BINDING = 51, - XR_TYPE_EVENT_DATA_INTERACTION_PROFILE_CHANGED = 52, - XR_TYPE_INTERACTION_PROFILE_STATE = 53, - XR_TYPE_SWAPCHAIN_IMAGE_ACQUIRE_INFO = 55, - XR_TYPE_SWAPCHAIN_IMAGE_WAIT_INFO = 56, - XR_TYPE_SWAPCHAIN_IMAGE_RELEASE_INFO = 57, - XR_TYPE_ACTION_STATE_GET_INFO = 58, - XR_TYPE_HAPTIC_ACTION_INFO = 59, - XR_TYPE_SESSION_ACTION_SETS_ATTACH_INFO = 60, - XR_TYPE_ACTIONS_SYNC_INFO = 61, - XR_TYPE_BOUND_SOURCES_FOR_ACTION_ENUMERATE_INFO = 62, - XR_TYPE_INPUT_SOURCE_LOCALIZED_NAME_GET_INFO = 63; - - /** - * XrFormFactor - * - *
Enum values:
- * - *
    - *
  • {@link #XR_FORM_FACTOR_HEAD_MOUNTED_DISPLAY FORM_FACTOR_HEAD_MOUNTED_DISPLAY}
  • - *
  • {@link #XR_FORM_FACTOR_HANDHELD_DISPLAY FORM_FACTOR_HANDHELD_DISPLAY}
  • - *
- */ - public static final int - XR_FORM_FACTOR_HEAD_MOUNTED_DISPLAY = 1, - XR_FORM_FACTOR_HANDHELD_DISPLAY = 2; - - /** - * XrViewConfigurationType - * - *
Enum values:
- * - *
    - *
  • {@link #XR_VIEW_CONFIGURATION_TYPE_PRIMARY_MONO VIEW_CONFIGURATION_TYPE_PRIMARY_MONO}
  • - *
  • {@link #XR_VIEW_CONFIGURATION_TYPE_PRIMARY_STEREO VIEW_CONFIGURATION_TYPE_PRIMARY_STEREO}
  • - *
- */ - public static final int - XR_VIEW_CONFIGURATION_TYPE_PRIMARY_MONO = 1, - XR_VIEW_CONFIGURATION_TYPE_PRIMARY_STEREO = 2; - - /** - * XrEnvironmentBlendMode - * - *
Enum values:
- * - *
    - *
  • {@link #XR_ENVIRONMENT_BLEND_MODE_OPAQUE ENVIRONMENT_BLEND_MODE_OPAQUE}
  • - *
  • {@link #XR_ENVIRONMENT_BLEND_MODE_ADDITIVE ENVIRONMENT_BLEND_MODE_ADDITIVE}
  • - *
  • {@link #XR_ENVIRONMENT_BLEND_MODE_ALPHA_BLEND ENVIRONMENT_BLEND_MODE_ALPHA_BLEND}
  • - *
- */ - public static final int - XR_ENVIRONMENT_BLEND_MODE_OPAQUE = 1, - XR_ENVIRONMENT_BLEND_MODE_ADDITIVE = 2, - XR_ENVIRONMENT_BLEND_MODE_ALPHA_BLEND = 3; - - /** - * XrSpaceVelocityFlagBits - * - *
Enum values:
- * - *
    - *
  • {@link #XR_SPACE_VELOCITY_LINEAR_VALID_BIT SPACE_VELOCITY_LINEAR_VALID_BIT}
  • - *
  • {@link #XR_SPACE_VELOCITY_ANGULAR_VALID_BIT SPACE_VELOCITY_ANGULAR_VALID_BIT}
  • - *
- */ - public static final int - XR_SPACE_VELOCITY_LINEAR_VALID_BIT = 0x1, - XR_SPACE_VELOCITY_ANGULAR_VALID_BIT = 0x2; - - /** - * XrReferenceSpaceType - * - *
Enum values:
- * - *
    - *
  • {@link #XR_REFERENCE_SPACE_TYPE_VIEW REFERENCE_SPACE_TYPE_VIEW}
  • - *
  • {@link #XR_REFERENCE_SPACE_TYPE_LOCAL REFERENCE_SPACE_TYPE_LOCAL}
  • - *
  • {@link #XR_REFERENCE_SPACE_TYPE_STAGE REFERENCE_SPACE_TYPE_STAGE}
  • - *
- */ - public static final int - XR_REFERENCE_SPACE_TYPE_VIEW = 1, - XR_REFERENCE_SPACE_TYPE_LOCAL = 2, - XR_REFERENCE_SPACE_TYPE_STAGE = 3; - - /** - * XrSpaceLocationFlagBits - * - *
Enum values:
- * - *
    - *
  • {@link #XR_SPACE_LOCATION_ORIENTATION_VALID_BIT SPACE_LOCATION_ORIENTATION_VALID_BIT}
  • - *
  • {@link #XR_SPACE_LOCATION_POSITION_VALID_BIT SPACE_LOCATION_POSITION_VALID_BIT}
  • - *
  • {@link #XR_SPACE_LOCATION_ORIENTATION_TRACKED_BIT SPACE_LOCATION_ORIENTATION_TRACKED_BIT}
  • - *
  • {@link #XR_SPACE_LOCATION_POSITION_TRACKED_BIT SPACE_LOCATION_POSITION_TRACKED_BIT}
  • - *
- */ - public static final int - XR_SPACE_LOCATION_ORIENTATION_VALID_BIT = 0x1, - XR_SPACE_LOCATION_POSITION_VALID_BIT = 0x2, - XR_SPACE_LOCATION_ORIENTATION_TRACKED_BIT = 0x4, - XR_SPACE_LOCATION_POSITION_TRACKED_BIT = 0x8; - - /** - * XrSwapchainCreateFlagBits - * - *
Enum values:
- * - *
    - *
  • {@link #XR_SWAPCHAIN_CREATE_PROTECTED_CONTENT_BIT SWAPCHAIN_CREATE_PROTECTED_CONTENT_BIT}
  • - *
  • {@link #XR_SWAPCHAIN_CREATE_STATIC_IMAGE_BIT SWAPCHAIN_CREATE_STATIC_IMAGE_BIT}
  • - *
- */ - public static final int - XR_SWAPCHAIN_CREATE_PROTECTED_CONTENT_BIT = 0x1, - XR_SWAPCHAIN_CREATE_STATIC_IMAGE_BIT = 0x2; - - /** - * XrSwapchainUsageFlagBits - * - *
Enum values:
- * - *
    - *
  • {@link #XR_SWAPCHAIN_USAGE_COLOR_ATTACHMENT_BIT SWAPCHAIN_USAGE_COLOR_ATTACHMENT_BIT}
  • - *
  • {@link #XR_SWAPCHAIN_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT SWAPCHAIN_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT}
  • - *
  • {@link #XR_SWAPCHAIN_USAGE_UNORDERED_ACCESS_BIT SWAPCHAIN_USAGE_UNORDERED_ACCESS_BIT}
  • - *
  • {@link #XR_SWAPCHAIN_USAGE_TRANSFER_SRC_BIT SWAPCHAIN_USAGE_TRANSFER_SRC_BIT}
  • - *
  • {@link #XR_SWAPCHAIN_USAGE_TRANSFER_DST_BIT SWAPCHAIN_USAGE_TRANSFER_DST_BIT}
  • - *
  • {@link #XR_SWAPCHAIN_USAGE_SAMPLED_BIT SWAPCHAIN_USAGE_SAMPLED_BIT}
  • - *
  • {@link #XR_SWAPCHAIN_USAGE_MUTABLE_FORMAT_BIT SWAPCHAIN_USAGE_MUTABLE_FORMAT_BIT}
  • - *
- */ - public static final int - XR_SWAPCHAIN_USAGE_COLOR_ATTACHMENT_BIT = 0x1, - XR_SWAPCHAIN_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x2, - XR_SWAPCHAIN_USAGE_UNORDERED_ACCESS_BIT = 0x4, - XR_SWAPCHAIN_USAGE_TRANSFER_SRC_BIT = 0x8, - XR_SWAPCHAIN_USAGE_TRANSFER_DST_BIT = 0x10, - XR_SWAPCHAIN_USAGE_SAMPLED_BIT = 0x20, - XR_SWAPCHAIN_USAGE_MUTABLE_FORMAT_BIT = 0x40; - - /** - * XrCompositionLayerFlagBits - * - *
Enum values:
- * - *
    - *
  • {@link #XR_COMPOSITION_LAYER_CORRECT_CHROMATIC_ABERRATION_BIT COMPOSITION_LAYER_CORRECT_CHROMATIC_ABERRATION_BIT}
  • - *
  • {@link #XR_COMPOSITION_LAYER_BLEND_TEXTURE_SOURCE_ALPHA_BIT COMPOSITION_LAYER_BLEND_TEXTURE_SOURCE_ALPHA_BIT}
  • - *
  • {@link #XR_COMPOSITION_LAYER_UNPREMULTIPLIED_ALPHA_BIT COMPOSITION_LAYER_UNPREMULTIPLIED_ALPHA_BIT}
  • - *
- */ - public static final int - XR_COMPOSITION_LAYER_CORRECT_CHROMATIC_ABERRATION_BIT = 0x1, - XR_COMPOSITION_LAYER_BLEND_TEXTURE_SOURCE_ALPHA_BIT = 0x2, - XR_COMPOSITION_LAYER_UNPREMULTIPLIED_ALPHA_BIT = 0x4; - - /** - * XrViewStateFlagBits - * - *
Enum values:
- * - *
    - *
  • {@link #XR_VIEW_STATE_ORIENTATION_VALID_BIT VIEW_STATE_ORIENTATION_VALID_BIT}
  • - *
  • {@link #XR_VIEW_STATE_POSITION_VALID_BIT VIEW_STATE_POSITION_VALID_BIT}
  • - *
  • {@link #XR_VIEW_STATE_ORIENTATION_TRACKED_BIT VIEW_STATE_ORIENTATION_TRACKED_BIT}
  • - *
  • {@link #XR_VIEW_STATE_POSITION_TRACKED_BIT VIEW_STATE_POSITION_TRACKED_BIT}
  • - *
- */ - public static final int - XR_VIEW_STATE_ORIENTATION_VALID_BIT = 0x1, - XR_VIEW_STATE_POSITION_VALID_BIT = 0x2, - XR_VIEW_STATE_ORIENTATION_TRACKED_BIT = 0x4, - XR_VIEW_STATE_POSITION_TRACKED_BIT = 0x8; - - /** - * XrActionType - * - *
Enum values:
- * - *
    - *
  • {@link #XR_ACTION_TYPE_BOOLEAN_INPUT ACTION_TYPE_BOOLEAN_INPUT}
  • - *
  • {@link #XR_ACTION_TYPE_FLOAT_INPUT ACTION_TYPE_FLOAT_INPUT}
  • - *
  • {@link #XR_ACTION_TYPE_VECTOR2F_INPUT ACTION_TYPE_VECTOR2F_INPUT}
  • - *
  • {@link #XR_ACTION_TYPE_POSE_INPUT ACTION_TYPE_POSE_INPUT}
  • - *
  • {@link #XR_ACTION_TYPE_VIBRATION_OUTPUT ACTION_TYPE_VIBRATION_OUTPUT}
  • - *
- */ - public static final int - XR_ACTION_TYPE_BOOLEAN_INPUT = 1, - XR_ACTION_TYPE_FLOAT_INPUT = 2, - XR_ACTION_TYPE_VECTOR2F_INPUT = 3, - XR_ACTION_TYPE_POSE_INPUT = 4, - XR_ACTION_TYPE_VIBRATION_OUTPUT = 100; - - /** - * XrInputSourceLocalizedNameFlagBits - * - *
Enum values:
- * - *
    - *
  • {@link #XR_INPUT_SOURCE_LOCALIZED_NAME_USER_PATH_BIT INPUT_SOURCE_LOCALIZED_NAME_USER_PATH_BIT}
  • - *
  • {@link #XR_INPUT_SOURCE_LOCALIZED_NAME_INTERACTION_PROFILE_BIT INPUT_SOURCE_LOCALIZED_NAME_INTERACTION_PROFILE_BIT}
  • - *
  • {@link #XR_INPUT_SOURCE_LOCALIZED_NAME_COMPONENT_BIT INPUT_SOURCE_LOCALIZED_NAME_COMPONENT_BIT}
  • - *
- */ - public static final int - XR_INPUT_SOURCE_LOCALIZED_NAME_USER_PATH_BIT = 0x1, - XR_INPUT_SOURCE_LOCALIZED_NAME_INTERACTION_PROFILE_BIT = 0x2, - XR_INPUT_SOURCE_LOCALIZED_NAME_COMPONENT_BIT = 0x4; - - /** - * XrEyeVisibility - * - *
Enum values:
- * - *
    - *
  • {@link #XR_EYE_VISIBILITY_BOTH EYE_VISIBILITY_BOTH}
  • - *
  • {@link #XR_EYE_VISIBILITY_LEFT EYE_VISIBILITY_LEFT}
  • - *
  • {@link #XR_EYE_VISIBILITY_RIGHT EYE_VISIBILITY_RIGHT}
  • - *
- */ - public static final int - XR_EYE_VISIBILITY_BOTH = 0, - XR_EYE_VISIBILITY_LEFT = 1, - XR_EYE_VISIBILITY_RIGHT = 2; - - /** - * XrSessionState - * - *
Enum values:
- * - *
    - *
  • {@link #XR_SESSION_STATE_UNKNOWN SESSION_STATE_UNKNOWN}
  • - *
  • {@link #XR_SESSION_STATE_IDLE SESSION_STATE_IDLE}
  • - *
  • {@link #XR_SESSION_STATE_READY SESSION_STATE_READY}
  • - *
  • {@link #XR_SESSION_STATE_SYNCHRONIZED SESSION_STATE_SYNCHRONIZED}
  • - *
  • {@link #XR_SESSION_STATE_VISIBLE SESSION_STATE_VISIBLE}
  • - *
  • {@link #XR_SESSION_STATE_FOCUSED SESSION_STATE_FOCUSED}
  • - *
  • {@link #XR_SESSION_STATE_STOPPING SESSION_STATE_STOPPING}
  • - *
  • {@link #XR_SESSION_STATE_LOSS_PENDING SESSION_STATE_LOSS_PENDING}
  • - *
  • {@link #XR_SESSION_STATE_EXITING SESSION_STATE_EXITING}
  • - *
- */ - public static final int - XR_SESSION_STATE_UNKNOWN = 0, - XR_SESSION_STATE_IDLE = 1, - XR_SESSION_STATE_READY = 2, - XR_SESSION_STATE_SYNCHRONIZED = 3, - XR_SESSION_STATE_VISIBLE = 4, - XR_SESSION_STATE_FOCUSED = 5, - XR_SESSION_STATE_STOPPING = 6, - XR_SESSION_STATE_LOSS_PENDING = 7, - XR_SESSION_STATE_EXITING = 8; - - /** - * XrObjectType - * - *
Enum values:
- * - *
    - *
  • {@link #XR_OBJECT_TYPE_UNKNOWN OBJECT_TYPE_UNKNOWN}
  • - *
  • {@link #XR_OBJECT_TYPE_INSTANCE OBJECT_TYPE_INSTANCE}
  • - *
  • {@link #XR_OBJECT_TYPE_SESSION OBJECT_TYPE_SESSION}
  • - *
  • {@link #XR_OBJECT_TYPE_SWAPCHAIN OBJECT_TYPE_SWAPCHAIN}
  • - *
  • {@link #XR_OBJECT_TYPE_SPACE OBJECT_TYPE_SPACE}
  • - *
  • {@link #XR_OBJECT_TYPE_ACTION_SET OBJECT_TYPE_ACTION_SET}
  • - *
  • {@link #XR_OBJECT_TYPE_ACTION OBJECT_TYPE_ACTION}
  • - *
- */ - public static final int - XR_OBJECT_TYPE_UNKNOWN = 0, - XR_OBJECT_TYPE_INSTANCE = 1, - XR_OBJECT_TYPE_SESSION = 2, - XR_OBJECT_TYPE_SWAPCHAIN = 3, - XR_OBJECT_TYPE_SPACE = 4, - XR_OBJECT_TYPE_ACTION_SET = 5, - XR_OBJECT_TYPE_ACTION = 6; - - /** XR_CURRENT_API_VERSION is the current version of the OpenXR API. */ - public static final long XR_CURRENT_API_VERSION = XR_MAKE_VERSION(1, 0, 14); - - /** API Constants */ - public static final int - XR_TRUE = 1, - XR_FALSE = 0, - XR_MAX_EXTENSION_NAME_SIZE = 128, - XR_MAX_API_LAYER_NAME_SIZE = 256, - XR_MAX_API_LAYER_DESCRIPTION_SIZE = 256, - XR_MAX_SYSTEM_NAME_SIZE = 256, - XR_MAX_APPLICATION_NAME_SIZE = 128, - XR_MAX_ENGINE_NAME_SIZE = 128, - XR_MAX_RUNTIME_NAME_SIZE = 128, - XR_MAX_PATH_LENGTH = 256, - XR_MAX_STRUCTURE_NAME_SIZE = 64, - XR_MAX_RESULT_STRING_SIZE = 64, - XR_MAX_GRAPHICS_APIS_SUPPORTED = 32, - XR_MAX_ACTION_SET_NAME_SIZE = 64, - XR_MAX_ACTION_NAME_SIZE = 64, - XR_MAX_LOCALIZED_ACTION_SET_NAME_SIZE = 128, - XR_MAX_LOCALIZED_ACTION_NAME_SIZE = 128, - XR_MIN_COMPOSITION_LAYERS_SUPPORTED = 16; - - public static final long - XR_NULL_SYSTEM_ID = 0, - XR_NULL_PATH = 0, - XR_NO_DURATION = 0, - XR_INFINITE_DURATION = 0x7fffffffffffffffL, - XR_MIN_HAPTIC_DURATION = -1, - XR_FREQUENCY_UNSPECIFIED = 0; - - /** - * {@code XR_NULL_HANDLE} is a reserved value representing a non-valid object handle. It may be passed to and returned from API functions only when - * specifically allowed. - */ - public static final long XR_NULL_HANDLE = 0x0L; - - protected XR10() { - throw new UnsupportedOperationException(); - } - - // --- [ xrGetInstanceProcAddr ] --- - - public static int nxrGetInstanceProcAddr(XrInstance instance, long name, long function) { - long __functionAddress = XR.getGlobalCommands().xrGetInstanceProcAddr; - return callPPPI(instance.address(), name, function, __functionAddress); - } - - @NativeType("XrResult") - public static int xrGetInstanceProcAddr(XrInstance instance, @NativeType("char const *") ByteBuffer name, @NativeType("PFN_xrVoidFunction *") PointerBuffer function) { - if (CHECKS) { - checkNT1(name); - check(function, 1); - } - return nxrGetInstanceProcAddr(instance, memAddress(name), memAddress(function)); - } - - @NativeType("XrResult") - public static int xrGetInstanceProcAddr(XrInstance instance, @NativeType("char const *") CharSequence name, @NativeType("PFN_xrVoidFunction *") PointerBuffer function) { - if (CHECKS) { - check(function, 1); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(name, true); - long nameEncoded = stack.getPointerAddress(); - return nxrGetInstanceProcAddr(instance, nameEncoded, memAddress(function)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ xrEnumerateApiLayerProperties ] --- - - public static int nxrEnumerateApiLayerProperties(int propertyCapacityInput, long propertyCountOutput, long properties) { - long __functionAddress = XR.getGlobalCommands().xrEnumerateApiLayerProperties; - return callPPI(propertyCapacityInput, propertyCountOutput, properties, __functionAddress); - } - - @NativeType("XrResult") - public static int xrEnumerateApiLayerProperties(@NativeType("uint32_t *") IntBuffer propertyCountOutput, @Nullable @NativeType("XrApiLayerProperties *") XrApiLayerProperties.Buffer properties) { - if (CHECKS) { - check(propertyCountOutput, 1); - } - return nxrEnumerateApiLayerProperties(remainingSafe(properties), memAddress(propertyCountOutput), memAddressSafe(properties)); - } - - // --- [ xrEnumerateInstanceExtensionProperties ] --- - - public static int nxrEnumerateInstanceExtensionProperties(long layerName, int propertyCapacityInput, long propertyCountOutput, long properties) { - long __functionAddress = XR.getGlobalCommands().xrEnumerateInstanceExtensionProperties; - return callPPPI(layerName, propertyCapacityInput, propertyCountOutput, properties, __functionAddress); - } - - @NativeType("XrResult") - public static int xrEnumerateInstanceExtensionProperties(@Nullable @NativeType("char const *") ByteBuffer layerName, @NativeType("uint32_t *") IntBuffer propertyCountOutput, @Nullable @NativeType("XrExtensionProperties *") XrExtensionProperties.Buffer properties) { - if (CHECKS) { - checkNT1Safe(layerName); - check(propertyCountOutput, 1); - } - return nxrEnumerateInstanceExtensionProperties(memAddressSafe(layerName), remainingSafe(properties), memAddress(propertyCountOutput), memAddressSafe(properties)); - } - - @NativeType("XrResult") - public static int xrEnumerateInstanceExtensionProperties(@Nullable @NativeType("char const *") CharSequence layerName, @NativeType("uint32_t *") IntBuffer propertyCountOutput, @Nullable @NativeType("XrExtensionProperties *") XrExtensionProperties.Buffer properties) { - if (CHECKS) { - check(propertyCountOutput, 1); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8Safe(layerName, true); - long layerNameEncoded = layerName == null ? NULL : stack.getPointerAddress(); - return nxrEnumerateInstanceExtensionProperties(layerNameEncoded, remainingSafe(properties), memAddress(propertyCountOutput), memAddressSafe(properties)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ xrCreateInstance ] --- - - public static int nxrCreateInstance(long createInfo, long instance) { - long __functionAddress = XR.getGlobalCommands().xrCreateInstance; - if (CHECKS) { - XrInstanceCreateInfo.validate(createInfo); - } - return callPPI(createInfo, instance, __functionAddress); - } - - @NativeType("XrResult") - public static int xrCreateInstance(@NativeType("XrInstanceCreateInfo const *") XrInstanceCreateInfo createInfo, @NativeType("XrInstance *") PointerBuffer instance) { - if (CHECKS) { - check(instance, 1); - } - return nxrCreateInstance(createInfo.address(), memAddress(instance)); - } - - // --- [ xrDestroyInstance ] --- - - @NativeType("XrResult") - public static int xrDestroyInstance(XrInstance instance) { - long __functionAddress = instance.getCapabilities().xrDestroyInstance; - return callPI(instance.address(), __functionAddress); - } - - // --- [ xrGetInstanceProperties ] --- - - public static int nxrGetInstanceProperties(XrInstance instance, long instanceProperties) { - long __functionAddress = instance.getCapabilities().xrGetInstanceProperties; - return callPPI(instance.address(), instanceProperties, __functionAddress); - } - - @NativeType("XrResult") - public static int xrGetInstanceProperties(XrInstance instance, @NativeType("XrInstanceProperties *") XrInstanceProperties instanceProperties) { - return nxrGetInstanceProperties(instance, instanceProperties.address()); - } - - // --- [ xrPollEvent ] --- - - public static int nxrPollEvent(XrInstance instance, long eventData) { - long __functionAddress = instance.getCapabilities().xrPollEvent; - return callPPI(instance.address(), eventData, __functionAddress); - } - - @NativeType("XrResult") - public static int xrPollEvent(XrInstance instance, @NativeType("XrEventDataBuffer *") XrEventDataBuffer eventData) { - return nxrPollEvent(instance, eventData.address()); - } - - // --- [ xrResultToString ] --- - - public static int nxrResultToString(XrInstance instance, int value, long buffer) { - long __functionAddress = instance.getCapabilities().xrResultToString; - return callPPI(instance.address(), value, buffer, __functionAddress); - } - - @NativeType("XrResult") - public static int xrResultToString(XrInstance instance, @NativeType("XrResult") int value, @NativeType("char *") ByteBuffer buffer) { - if (CHECKS) { - check(buffer, XR_MAX_RESULT_STRING_SIZE); - } - return nxrResultToString(instance, value, memAddress(buffer)); - } - - // --- [ xrStructureTypeToString ] --- - - public static int nxrStructureTypeToString(XrInstance instance, int value, long buffer) { - long __functionAddress = instance.getCapabilities().xrStructureTypeToString; - return callPPI(instance.address(), value, buffer, __functionAddress); - } - - @NativeType("XrResult") - public static int xrStructureTypeToString(XrInstance instance, @NativeType("XrStructureType") int value, @NativeType("char *") ByteBuffer buffer) { - if (CHECKS) { - check(buffer, XR_MAX_STRUCTURE_NAME_SIZE); - } - return nxrStructureTypeToString(instance, value, memAddress(buffer)); - } - - // --- [ xrGetSystem ] --- - - public static int nxrGetSystem(XrInstance instance, long getInfo, long systemId) { - long __functionAddress = instance.getCapabilities().xrGetSystem; - return callPPPI(instance.address(), getInfo, systemId, __functionAddress); - } - - @NativeType("XrResult") - public static int xrGetSystem(XrInstance instance, @NativeType("XrSystemGetInfo const *") XrSystemGetInfo getInfo, @NativeType("XrSystemId *") LongBuffer systemId) { - if (CHECKS) { - check(systemId, 1); - } - return nxrGetSystem(instance, getInfo.address(), memAddress(systemId)); - } - - // --- [ xrGetSystemProperties ] --- - - public static int nxrGetSystemProperties(XrInstance instance, long systemId, long properties) { - long __functionAddress = instance.getCapabilities().xrGetSystemProperties; - return callPJPI(instance.address(), systemId, properties, __functionAddress); - } - - @NativeType("XrResult") - public static int xrGetSystemProperties(XrInstance instance, @NativeType("XrSystemId") long systemId, @NativeType("XrSystemProperties *") XrSystemProperties properties) { - return nxrGetSystemProperties(instance, systemId, properties.address()); - } - - // --- [ xrEnumerateEnvironmentBlendModes ] --- - - public static int nxrEnumerateEnvironmentBlendModes(XrInstance instance, long systemId, int viewConfigurationType, int environmentBlendModeCapacityInput, long environmentBlendModeCountOutput, long environmentBlendModes) { - long __functionAddress = instance.getCapabilities().xrEnumerateEnvironmentBlendModes; - return callPJPPI(instance.address(), systemId, viewConfigurationType, environmentBlendModeCapacityInput, environmentBlendModeCountOutput, environmentBlendModes, __functionAddress); - } - - @NativeType("XrResult") - public static int xrEnumerateEnvironmentBlendModes(XrInstance instance, @NativeType("XrSystemId") long systemId, @NativeType("XrViewConfigurationType") int viewConfigurationType, @NativeType("uint32_t *") IntBuffer environmentBlendModeCountOutput, @Nullable @NativeType("XrEnvironmentBlendMode *") IntBuffer environmentBlendModes) { - if (CHECKS) { - check(environmentBlendModeCountOutput, 1); - } - return nxrEnumerateEnvironmentBlendModes(instance, systemId, viewConfigurationType, remainingSafe(environmentBlendModes), memAddress(environmentBlendModeCountOutput), memAddressSafe(environmentBlendModes)); - } - - // --- [ xrCreateSession ] --- - - public static int nxrCreateSession(XrInstance instance, long createInfo, long session) { - long __functionAddress = instance.getCapabilities().xrCreateSession; - return callPPPI(instance.address(), createInfo, session, __functionAddress); - } - - @NativeType("XrResult") - public static int xrCreateSession(XrInstance instance, @NativeType("XrSessionCreateInfo const *") XrSessionCreateInfo createInfo, @NativeType("XrSession *") PointerBuffer session) { - if (CHECKS) { - check(session, 1); - } - return nxrCreateSession(instance, createInfo.address(), memAddress(session)); - } - - // --- [ xrDestroySession ] --- - - @NativeType("XrResult") - public static int xrDestroySession(XrSession session) { - long __functionAddress = session.getCapabilities().xrDestroySession; - return callPI(session.address(), __functionAddress); - } - - // --- [ xrEnumerateReferenceSpaces ] --- - - public static int nxrEnumerateReferenceSpaces(XrSession session, int spaceCapacityInput, long spaceCountOutput, long spaces) { - long __functionAddress = session.getCapabilities().xrEnumerateReferenceSpaces; - return callPPPI(session.address(), spaceCapacityInput, spaceCountOutput, spaces, __functionAddress); - } - - @NativeType("XrResult") - public static int xrEnumerateReferenceSpaces(XrSession session, @NativeType("uint32_t *") IntBuffer spaceCountOutput, @Nullable @NativeType("XrReferenceSpaceType *") IntBuffer spaces) { - if (CHECKS) { - check(spaceCountOutput, 1); - } - return nxrEnumerateReferenceSpaces(session, remainingSafe(spaces), memAddress(spaceCountOutput), memAddressSafe(spaces)); - } - - // --- [ xrCreateReferenceSpace ] --- - - public static int nxrCreateReferenceSpace(XrSession session, long createInfo, long space) { - long __functionAddress = session.getCapabilities().xrCreateReferenceSpace; - return callPPPI(session.address(), createInfo, space, __functionAddress); - } - - @NativeType("XrResult") - public static int xrCreateReferenceSpace(XrSession session, @NativeType("XrReferenceSpaceCreateInfo const *") XrReferenceSpaceCreateInfo createInfo, @NativeType("XrSpace *") PointerBuffer space) { - if (CHECKS) { - check(space, 1); - } - return nxrCreateReferenceSpace(session, createInfo.address(), memAddress(space)); - } - - // --- [ xrGetReferenceSpaceBoundsRect ] --- - - public static int nxrGetReferenceSpaceBoundsRect(XrSession session, int referenceSpaceType, long bounds) { - long __functionAddress = session.getCapabilities().xrGetReferenceSpaceBoundsRect; - return callPPI(session.address(), referenceSpaceType, bounds, __functionAddress); - } - - @NativeType("XrResult") - public static int xrGetReferenceSpaceBoundsRect(XrSession session, @NativeType("XrReferenceSpaceType") int referenceSpaceType, @NativeType("XrExtent2Df *") XrExtent2Df bounds) { - return nxrGetReferenceSpaceBoundsRect(session, referenceSpaceType, bounds.address()); - } - - // --- [ xrCreateActionSpace ] --- - - public static int nxrCreateActionSpace(XrSession session, long createInfo, long space) { - long __functionAddress = session.getCapabilities().xrCreateActionSpace; - if (CHECKS) { - XrActionSpaceCreateInfo.validate(createInfo); - } - return callPPPI(session.address(), createInfo, space, __functionAddress); - } - - @NativeType("XrResult") - public static int xrCreateActionSpace(XrSession session, @NativeType("XrActionSpaceCreateInfo const *") XrActionSpaceCreateInfo createInfo, @NativeType("XrSpace *") PointerBuffer space) { - if (CHECKS) { - check(space, 1); - } - return nxrCreateActionSpace(session, createInfo.address(), memAddress(space)); - } - - // --- [ xrLocateSpace ] --- - - public static int nxrLocateSpace(XrSpace space, XrSpace baseSpace, long time, long location) { - long __functionAddress = space.getCapabilities().xrLocateSpace; - return LWJGLCompat.callPPJPI(space.address(), baseSpace.address(), time, location, __functionAddress); - } - - @NativeType("XrResult") - public static int xrLocateSpace(XrSpace space, XrSpace baseSpace, @NativeType("XrTime") long time, @NativeType("XrSpaceLocation *") XrSpaceLocation location) { - return nxrLocateSpace(space, baseSpace, time, location.address()); - } - - // --- [ xrDestroySpace ] --- - - @NativeType("XrResult") - public static int xrDestroySpace(XrSpace space) { - long __functionAddress = space.getCapabilities().xrDestroySpace; - return callPI(space.address(), __functionAddress); - } - - // --- [ xrEnumerateViewConfigurations ] --- - - public static int nxrEnumerateViewConfigurations(XrInstance instance, long systemId, int viewConfigurationTypeCapacityInput, long viewConfigurationTypeCountOutput, long viewConfigurationTypes) { - long __functionAddress = instance.getCapabilities().xrEnumerateViewConfigurations; - return callPJPPI(instance.address(), systemId, viewConfigurationTypeCapacityInput, viewConfigurationTypeCountOutput, viewConfigurationTypes, __functionAddress); - } - - @NativeType("XrResult") - public static int xrEnumerateViewConfigurations(XrInstance instance, @NativeType("XrSystemId") long systemId, @NativeType("uint32_t *") IntBuffer viewConfigurationTypeCountOutput, @Nullable @NativeType("XrViewConfigurationType *") IntBuffer viewConfigurationTypes) { - if (CHECKS) { - check(viewConfigurationTypeCountOutput, 1); - } - return nxrEnumerateViewConfigurations(instance, systemId, remainingSafe(viewConfigurationTypes), memAddress(viewConfigurationTypeCountOutput), memAddressSafe(viewConfigurationTypes)); - } - - // --- [ xrGetViewConfigurationProperties ] --- - - public static int nxrGetViewConfigurationProperties(XrInstance instance, long systemId, int viewConfigurationType, long configurationProperties) { - long __functionAddress = instance.getCapabilities().xrGetViewConfigurationProperties; - return callPJPI(instance.address(), systemId, viewConfigurationType, configurationProperties, __functionAddress); - } - - @NativeType("XrResult") - public static int xrGetViewConfigurationProperties(XrInstance instance, @NativeType("XrSystemId") long systemId, @NativeType("XrViewConfigurationType") int viewConfigurationType, @NativeType("XrViewConfigurationProperties *") XrViewConfigurationProperties configurationProperties) { - return nxrGetViewConfigurationProperties(instance, systemId, viewConfigurationType, configurationProperties.address()); - } - - // --- [ xrEnumerateViewConfigurationViews ] --- - - public static int nxrEnumerateViewConfigurationViews(XrInstance instance, long systemId, int viewConfigurationType, int viewCapacityInput, long viewCountOutput, long views) { - long __functionAddress = instance.getCapabilities().xrEnumerateViewConfigurationViews; - return callPJPPI(instance.address(), systemId, viewConfigurationType, viewCapacityInput, viewCountOutput, views, __functionAddress); - } - - @NativeType("XrResult") - public static int xrEnumerateViewConfigurationViews(XrInstance instance, @NativeType("XrSystemId") long systemId, @NativeType("XrViewConfigurationType") int viewConfigurationType, @NativeType("uint32_t *") IntBuffer viewCountOutput, @Nullable @NativeType("XrViewConfigurationView *") XrViewConfigurationView.Buffer views) { - if (CHECKS) { - check(viewCountOutput, 1); - } - return nxrEnumerateViewConfigurationViews(instance, systemId, viewConfigurationType, remainingSafe(views), memAddress(viewCountOutput), memAddressSafe(views)); - } - - // --- [ xrEnumerateSwapchainFormats ] --- - - public static int nxrEnumerateSwapchainFormats(XrSession session, int formatCapacityInput, long formatCountOutput, long formats) { - long __functionAddress = session.getCapabilities().xrEnumerateSwapchainFormats; - return callPPPI(session.address(), formatCapacityInput, formatCountOutput, formats, __functionAddress); - } - - @NativeType("XrResult") - public static int xrEnumerateSwapchainFormats(XrSession session, @NativeType("uint32_t *") IntBuffer formatCountOutput, @Nullable @NativeType("int64_t *") LongBuffer formats) { - if (CHECKS) { - check(formatCountOutput, 1); - } - return nxrEnumerateSwapchainFormats(session, remainingSafe(formats), memAddress(formatCountOutput), memAddressSafe(formats)); - } - - // --- [ xrCreateSwapchain ] --- - - public static int nxrCreateSwapchain(XrSession session, long createInfo, long swapchain) { - long __functionAddress = session.getCapabilities().xrCreateSwapchain; - return callPPPI(session.address(), createInfo, swapchain, __functionAddress); - } - - @NativeType("XrResult") - public static int xrCreateSwapchain(XrSession session, @NativeType("XrSwapchainCreateInfo const *") XrSwapchainCreateInfo createInfo, @NativeType("XrSwapchain *") PointerBuffer swapchain) { - if (CHECKS) { - check(swapchain, 1); - } - return nxrCreateSwapchain(session, createInfo.address(), memAddress(swapchain)); - } - - // --- [ xrDestroySwapchain ] --- - - @NativeType("XrResult") - public static int xrDestroySwapchain(XrSwapchain swapchain) { - long __functionAddress = swapchain.getCapabilities().xrDestroySwapchain; - return callPI(swapchain.address(), __functionAddress); - } - - // --- [ xrEnumerateSwapchainImages ] --- - - public static int nxrEnumerateSwapchainImages(XrSwapchain swapchain, int imageCapacityInput, long imageCountOutput, long images) { - long __functionAddress = swapchain.getCapabilities().xrEnumerateSwapchainImages; - return callPPPI(swapchain.address(), imageCapacityInput, imageCountOutput, images, __functionAddress); - } - - @NativeType("XrResult") - public static int xrEnumerateSwapchainImages(XrSwapchain swapchain, @NativeType("uint32_t *") IntBuffer imageCountOutput, @Nullable @NativeType("XrSwapchainImageBaseHeader *") XrSwapchainImageBaseHeader.Buffer images) { - if (CHECKS) { - check(imageCountOutput, 1); - } - return nxrEnumerateSwapchainImages(swapchain, remainingSafe(images), memAddress(imageCountOutput), memAddressSafe(images)); - } - - // --- [ xrAcquireSwapchainImage ] --- - - public static int nxrAcquireSwapchainImage(XrSwapchain swapchain, long acquireInfo, long index) { - long __functionAddress = swapchain.getCapabilities().xrAcquireSwapchainImage; - return callPPPI(swapchain.address(), acquireInfo, index, __functionAddress); - } - - @NativeType("XrResult") - public static int xrAcquireSwapchainImage(XrSwapchain swapchain, @Nullable @NativeType("XrSwapchainImageAcquireInfo const *") XrSwapchainImageAcquireInfo acquireInfo, @NativeType("uint32_t *") IntBuffer index) { - if (CHECKS) { - check(index, 1); - } - return nxrAcquireSwapchainImage(swapchain, memAddressSafe(acquireInfo), memAddress(index)); - } - - // --- [ xrWaitSwapchainImage ] --- - - public static int nxrWaitSwapchainImage(XrSwapchain swapchain, long waitInfo) { - long __functionAddress = swapchain.getCapabilities().xrWaitSwapchainImage; - return callPPI(swapchain.address(), waitInfo, __functionAddress); - } - - @NativeType("XrResult") - public static int xrWaitSwapchainImage(XrSwapchain swapchain, @NativeType("XrSwapchainImageWaitInfo const *") XrSwapchainImageWaitInfo waitInfo) { - return nxrWaitSwapchainImage(swapchain, waitInfo.address()); - } - - // --- [ xrReleaseSwapchainImage ] --- - - public static int nxrReleaseSwapchainImage(XrSwapchain swapchain, long releaseInfo) { - long __functionAddress = swapchain.getCapabilities().xrReleaseSwapchainImage; - return callPPI(swapchain.address(), releaseInfo, __functionAddress); - } - - @NativeType("XrResult") - public static int xrReleaseSwapchainImage(XrSwapchain swapchain, @Nullable @NativeType("XrSwapchainImageReleaseInfo const *") XrSwapchainImageReleaseInfo releaseInfo) { - return nxrReleaseSwapchainImage(swapchain, memAddressSafe(releaseInfo)); - } - - // --- [ xrBeginSession ] --- - - public static int nxrBeginSession(XrSession session, long beginInfo) { - long __functionAddress = session.getCapabilities().xrBeginSession; - return callPPI(session.address(), beginInfo, __functionAddress); - } - - @NativeType("XrResult") - public static int xrBeginSession(XrSession session, @NativeType("XrSessionBeginInfo const *") XrSessionBeginInfo beginInfo) { - return nxrBeginSession(session, beginInfo.address()); - } - - // --- [ xrEndSession ] --- - - @NativeType("XrResult") - public static int xrEndSession(XrSession session) { - long __functionAddress = session.getCapabilities().xrEndSession; - return callPI(session.address(), __functionAddress); - } - - // --- [ xrRequestExitSession ] --- - - @NativeType("XrResult") - public static int xrRequestExitSession(XrSession session) { - long __functionAddress = session.getCapabilities().xrRequestExitSession; - return callPI(session.address(), __functionAddress); - } - - // --- [ xrWaitFrame ] --- - - public static int nxrWaitFrame(XrSession session, long frameWaitInfo, long frameState) { - long __functionAddress = session.getCapabilities().xrWaitFrame; - return callPPPI(session.address(), frameWaitInfo, frameState, __functionAddress); - } - - @NativeType("XrResult") - public static int xrWaitFrame(XrSession session, @Nullable @NativeType("XrFrameWaitInfo const *") XrFrameWaitInfo frameWaitInfo, @NativeType("XrFrameState *") XrFrameState frameState) { - return nxrWaitFrame(session, memAddressSafe(frameWaitInfo), frameState.address()); - } - - // --- [ xrBeginFrame ] --- - - public static int nxrBeginFrame(XrSession session, long frameBeginInfo) { - long __functionAddress = session.getCapabilities().xrBeginFrame; - return callPPI(session.address(), frameBeginInfo, __functionAddress); - } - - @NativeType("XrResult") - public static int xrBeginFrame(XrSession session, @Nullable @NativeType("XrFrameBeginInfo const *") XrFrameBeginInfo frameBeginInfo) { - return nxrBeginFrame(session, memAddressSafe(frameBeginInfo)); - } - - // --- [ xrEndFrame ] --- - - public static int nxrEndFrame(XrSession session, long frameEndInfo) { - long __functionAddress = session.getCapabilities().xrEndFrame; - return callPPI(session.address(), frameEndInfo, __functionAddress); - } - - @NativeType("XrResult") - public static int xrEndFrame(XrSession session, @NativeType("XrFrameEndInfo const *") XrFrameEndInfo frameEndInfo) { - return nxrEndFrame(session, frameEndInfo.address()); - } - - // --- [ xrLocateViews ] --- - - public static int nxrLocateViews(XrSession session, long viewLocateInfo, long viewState, int viewCapacityInput, long viewCountOutput, long views) { - long __functionAddress = session.getCapabilities().xrLocateViews; - if (CHECKS) { - XrViewLocateInfo.validate(viewLocateInfo); - } - return callPPPPPI(session.address(), viewLocateInfo, viewState, viewCapacityInput, viewCountOutput, views, __functionAddress); - } - - @NativeType("XrResult") - public static int xrLocateViews(XrSession session, @NativeType("XrViewLocateInfo const *") XrViewLocateInfo viewLocateInfo, @NativeType("XrViewState *") XrViewState viewState, @NativeType("uint32_t *") IntBuffer viewCountOutput, @Nullable @NativeType("XrView *") XrView.Buffer views) { - if (CHECKS) { - check(viewCountOutput, 1); - } - return nxrLocateViews(session, viewLocateInfo.address(), viewState.address(), remainingSafe(views), memAddress(viewCountOutput), memAddressSafe(views)); - } - - // --- [ xrStringToPath ] --- - - public static int nxrStringToPath(XrInstance instance, long pathString, long path) { - long __functionAddress = instance.getCapabilities().xrStringToPath; - return callPPPI(instance.address(), pathString, path, __functionAddress); - } - - @NativeType("XrResult") - public static int xrStringToPath(XrInstance instance, @NativeType("char const *") ByteBuffer pathString, @NativeType("XrPath *") LongBuffer path) { - if (CHECKS) { - checkNT1(pathString); - check(path, 1); - } - return nxrStringToPath(instance, memAddress(pathString), memAddress(path)); - } - - @NativeType("XrResult") - public static int xrStringToPath(XrInstance instance, @NativeType("char const *") CharSequence pathString, @NativeType("XrPath *") LongBuffer path) { - if (CHECKS) { - check(path, 1); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(pathString, true); - long pathStringEncoded = stack.getPointerAddress(); - return nxrStringToPath(instance, pathStringEncoded, memAddress(path)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ xrPathToString ] --- - - public static int nxrPathToString(XrInstance instance, long path, int bufferCapacityInput, long bufferCountOutput, long buffer) { - long __functionAddress = instance.getCapabilities().xrPathToString; - return callPJPPI(instance.address(), path, bufferCapacityInput, bufferCountOutput, buffer, __functionAddress); - } - - @NativeType("XrResult") - public static int xrPathToString(XrInstance instance, @NativeType("XrPath") long path, @NativeType("uint32_t *") IntBuffer bufferCountOutput, @Nullable @NativeType("char *") ByteBuffer buffer) { - if (CHECKS) { - check(bufferCountOutput, 1); - } - return nxrPathToString(instance, path, remainingSafe(buffer), memAddress(bufferCountOutput), memAddressSafe(buffer)); - } - - // --- [ xrCreateActionSet ] --- - - public static int nxrCreateActionSet(XrInstance instance, long createInfo, long actionSet) { - long __functionAddress = instance.getCapabilities().xrCreateActionSet; - return callPPPI(instance.address(), createInfo, actionSet, __functionAddress); - } - - @NativeType("XrResult") - public static int xrCreateActionSet(XrInstance instance, @NativeType("XrActionSetCreateInfo const *") XrActionSetCreateInfo createInfo, @NativeType("XrActionSet *") PointerBuffer actionSet) { - if (CHECKS) { - check(actionSet, 1); - } - return nxrCreateActionSet(instance, createInfo.address(), memAddress(actionSet)); - } - - // --- [ xrDestroyActionSet ] --- - - @NativeType("XrResult") - public static int xrDestroyActionSet(XrActionSet actionSet) { - long __functionAddress = actionSet.getCapabilities().xrDestroyActionSet; - return callPI(actionSet.address(), __functionAddress); - } - - // --- [ xrCreateAction ] --- - - public static int nxrCreateAction(XrActionSet actionSet, long createInfo, long action) { - long __functionAddress = actionSet.getCapabilities().xrCreateAction; - return callPPPI(actionSet.address(), createInfo, action, __functionAddress); - } - - @NativeType("XrResult") - public static int xrCreateAction(XrActionSet actionSet, @NativeType("XrActionCreateInfo const *") XrActionCreateInfo createInfo, @NativeType("XrAction *") PointerBuffer action) { - if (CHECKS) { - check(action, 1); - } - return nxrCreateAction(actionSet, createInfo.address(), memAddress(action)); - } - - // --- [ xrDestroyAction ] --- - - @NativeType("XrResult") - public static int xrDestroyAction(XrAction action) { - long __functionAddress = action.getCapabilities().xrDestroyAction; - return callPI(action.address(), __functionAddress); - } - - // --- [ xrSuggestInteractionProfileBindings ] --- - - public static int nxrSuggestInteractionProfileBindings(XrInstance instance, long suggestedBindings) { - long __functionAddress = instance.getCapabilities().xrSuggestInteractionProfileBindings; - if (CHECKS) { - XrInteractionProfileSuggestedBinding.validate(suggestedBindings); - } - return callPPI(instance.address(), suggestedBindings, __functionAddress); - } - - @NativeType("XrResult") - public static int xrSuggestInteractionProfileBindings(XrInstance instance, @NativeType("XrInteractionProfileSuggestedBinding const *") XrInteractionProfileSuggestedBinding suggestedBindings) { - return nxrSuggestInteractionProfileBindings(instance, suggestedBindings.address()); - } - - // --- [ xrAttachSessionActionSets ] --- - - public static int nxrAttachSessionActionSets(XrSession session, long attachInfo) { - long __functionAddress = session.getCapabilities().xrAttachSessionActionSets; - if (CHECKS) { - XrSessionActionSetsAttachInfo.validate(attachInfo); - } - return callPPI(session.address(), attachInfo, __functionAddress); - } - - @NativeType("XrResult") - public static int xrAttachSessionActionSets(XrSession session, @NativeType("XrSessionActionSetsAttachInfo const *") XrSessionActionSetsAttachInfo attachInfo) { - return nxrAttachSessionActionSets(session, attachInfo.address()); - } - - // --- [ xrGetCurrentInteractionProfile ] --- - - public static int nxrGetCurrentInteractionProfile(XrSession session, long topLevelUserPath, long interactionProfile) { - long __functionAddress = session.getCapabilities().xrGetCurrentInteractionProfile; - return callPJPI(session.address(), topLevelUserPath, interactionProfile, __functionAddress); - } - - @NativeType("XrResult") - public static int xrGetCurrentInteractionProfile(XrSession session, @NativeType("XrPath") long topLevelUserPath, @NativeType("XrInteractionProfileState *") XrInteractionProfileState interactionProfile) { - return nxrGetCurrentInteractionProfile(session, topLevelUserPath, interactionProfile.address()); - } - - // --- [ xrGetActionStateBoolean ] --- - - public static int nxrGetActionStateBoolean(XrSession session, long getInfo, long state) { - long __functionAddress = session.getCapabilities().xrGetActionStateBoolean; - if (CHECKS) { - XrActionStateGetInfo.validate(getInfo); - } - return callPPPI(session.address(), getInfo, state, __functionAddress); - } - - @NativeType("XrResult") - public static int xrGetActionStateBoolean(XrSession session, @NativeType("XrActionStateGetInfo const *") XrActionStateGetInfo getInfo, @NativeType("XrActionStateBoolean *") XrActionStateBoolean state) { - return nxrGetActionStateBoolean(session, getInfo.address(), state.address()); - } - - // --- [ xrGetActionStateFloat ] --- - - public static int nxrGetActionStateFloat(XrSession session, long getInfo, long state) { - long __functionAddress = session.getCapabilities().xrGetActionStateFloat; - if (CHECKS) { - XrActionStateGetInfo.validate(getInfo); - } - return callPPPI(session.address(), getInfo, state, __functionAddress); - } - - @NativeType("XrResult") - public static int xrGetActionStateFloat(XrSession session, @NativeType("XrActionStateGetInfo const *") XrActionStateGetInfo getInfo, @NativeType("XrActionStateFloat *") XrActionStateFloat state) { - return nxrGetActionStateFloat(session, getInfo.address(), state.address()); - } - - // --- [ xrGetActionStateVector2f ] --- - - public static int nxrGetActionStateVector2f(XrSession session, long getInfo, long state) { - long __functionAddress = session.getCapabilities().xrGetActionStateVector2f; - if (CHECKS) { - XrActionStateGetInfo.validate(getInfo); - } - return callPPPI(session.address(), getInfo, state, __functionAddress); - } - - @NativeType("XrResult") - public static int xrGetActionStateVector2f(XrSession session, @NativeType("XrActionStateGetInfo const *") XrActionStateGetInfo getInfo, @NativeType("XrActionStateVector2f *") XrActionStateVector2f state) { - return nxrGetActionStateVector2f(session, getInfo.address(), state.address()); - } - - // --- [ xrGetActionStatePose ] --- - - public static int nxrGetActionStatePose(XrSession session, long getInfo, long state) { - long __functionAddress = session.getCapabilities().xrGetActionStatePose; - if (CHECKS) { - XrActionStateGetInfo.validate(getInfo); - } - return callPPPI(session.address(), getInfo, state, __functionAddress); - } - - @NativeType("XrResult") - public static int xrGetActionStatePose(XrSession session, @NativeType("XrActionStateGetInfo const *") XrActionStateGetInfo getInfo, @NativeType("XrActionStatePose *") XrActionStatePose state) { - return nxrGetActionStatePose(session, getInfo.address(), state.address()); - } - - // --- [ xrSyncActions ] --- - - public static int nxrSyncActions(XrSession session, long syncInfo) { - long __functionAddress = session.getCapabilities().xrSyncActions; - return callPPI(session.address(), syncInfo, __functionAddress); - } - - @NativeType("XrResult") - public static int xrSyncActions(XrSession session, @NativeType("XrActionsSyncInfo const *") XrActionsSyncInfo syncInfo) { - return nxrSyncActions(session, syncInfo.address()); - } - - // --- [ xrEnumerateBoundSourcesForAction ] --- - - public static int nxrEnumerateBoundSourcesForAction(XrSession session, long enumerateInfo, int sourceCapacityInput, long sourceCountOutput, long sources) { - long __functionAddress = session.getCapabilities().xrEnumerateBoundSourcesForAction; - if (CHECKS) { - XrBoundSourcesForActionEnumerateInfo.validate(enumerateInfo); - } - return callPPPPI(session.address(), enumerateInfo, sourceCapacityInput, sourceCountOutput, sources, __functionAddress); - } - - @NativeType("XrResult") - public static int xrEnumerateBoundSourcesForAction(XrSession session, @NativeType("XrBoundSourcesForActionEnumerateInfo const *") XrBoundSourcesForActionEnumerateInfo enumerateInfo, @NativeType("uint32_t *") IntBuffer sourceCountOutput, @Nullable @NativeType("XrPath *") LongBuffer sources) { - if (CHECKS) { - check(sourceCountOutput, 1); - } - return nxrEnumerateBoundSourcesForAction(session, enumerateInfo.address(), remainingSafe(sources), memAddress(sourceCountOutput), memAddressSafe(sources)); - } - - // --- [ xrGetInputSourceLocalizedName ] --- - - public static int nxrGetInputSourceLocalizedName(XrSession session, long getInfo, int bufferCapacityInput, long bufferCountOutput, long buffer) { - long __functionAddress = session.getCapabilities().xrGetInputSourceLocalizedName; - return callPPPPI(session.address(), getInfo, bufferCapacityInput, bufferCountOutput, buffer, __functionAddress); - } - - @NativeType("XrResult") - public static int xrGetInputSourceLocalizedName(XrSession session, @NativeType("XrInputSourceLocalizedNameGetInfo const *") XrInputSourceLocalizedNameGetInfo getInfo, @NativeType("uint32_t *") IntBuffer bufferCountOutput, @Nullable @NativeType("char *") ByteBuffer buffer) { - if (CHECKS) { - check(bufferCountOutput, 1); - } - return nxrGetInputSourceLocalizedName(session, getInfo.address(), remainingSafe(buffer), memAddress(bufferCountOutput), memAddressSafe(buffer)); - } - - // --- [ xrApplyHapticFeedback ] --- - - public static int nxrApplyHapticFeedback(XrSession session, long hapticActionInfo, long hapticFeedback) { - long __functionAddress = session.getCapabilities().xrApplyHapticFeedback; - if (CHECKS) { - XrHapticActionInfo.validate(hapticActionInfo); - } - return callPPPI(session.address(), hapticActionInfo, hapticFeedback, __functionAddress); - } - - @NativeType("XrResult") - public static int xrApplyHapticFeedback(XrSession session, @NativeType("XrHapticActionInfo const *") XrHapticActionInfo hapticActionInfo, @NativeType("XrHapticBaseHeader const *") XrHapticBaseHeader hapticFeedback) { - return nxrApplyHapticFeedback(session, hapticActionInfo.address(), hapticFeedback.address()); - } - - // --- [ xrStopHapticFeedback ] --- - - public static int nxrStopHapticFeedback(XrSession session, long hapticActionInfo) { - long __functionAddress = session.getCapabilities().xrStopHapticFeedback; - if (CHECKS) { - XrHapticActionInfo.validate(hapticActionInfo); - } - return callPPI(session.address(), hapticActionInfo, __functionAddress); - } - - @NativeType("XrResult") - public static int xrStopHapticFeedback(XrSession session, @NativeType("XrHapticActionInfo const *") XrHapticActionInfo hapticActionInfo) { - return nxrStopHapticFeedback(session, hapticActionInfo.address()); - } - - // --- [ XR_MAKE_VERSION ] --- - - /** - * Constructs an API version number. - * - *

This macro can be used when constructing the {@link XrApplicationInfo}{@code ::pname:apiVersion} parameter passed to {@link #xrCreateInstance CreateInstance}.

- * - * @param major the major version number - * @param minor the minor version number - * @param patch the patch version number - */ - @NativeType("uint64_t") - public static long XR_MAKE_VERSION(@NativeType("uint32_t") int major, @NativeType("uint32_t") int minor, @NativeType("uint32_t") int patch) { - return ((major & 0xffffL) << 48) | ((minor & 0xffffL) << 32) | patch; - } - - // --- [ XR_VERSION_MAJOR ] --- - - /** - * Extracts the API major version number from a packed version number. - * - * @param version the OpenXR API version - */ - @NativeType("uint64_t") - public static long XR_VERSION_MAJOR(@NativeType("uint64_t") long version) { - return (version >>> 48) & 0xffffL; - } - - // --- [ XR_VERSION_MINOR ] --- - - /** - * Extracts the API minor version number from a packed version number. - * - * @param version the OpenXR API version - */ - @NativeType("uint64_t") - public static long XR_VERSION_MINOR(@NativeType("uint64_t") long version) { - return (version >>> 32) & 0xffffL; - } - - // --- [ XR_VERSION_PATCH ] --- - - /** - * Extracts the API patch version number from a packed version number. - * - * @param version the OpenXR API version - */ - @NativeType("uint64_t") - public static long XR_VERSION_PATCH(@NativeType("uint64_t") long version) { - return version & 0xffffffffL; - } - - /** Array version of: {@link #xrEnumerateApiLayerProperties EnumerateApiLayerProperties} */ - @NativeType("XrResult") - public static int xrEnumerateApiLayerProperties(@NativeType("uint32_t *") int[] propertyCountOutput, @Nullable @NativeType("XrApiLayerProperties *") XrApiLayerProperties.Buffer properties) { - long __functionAddress = XR.getGlobalCommands().xrEnumerateApiLayerProperties; - if (CHECKS) { - check(propertyCountOutput, 1); - } - throw new RuntimeException("JNI call does not exist in LWJGL version"); -//return callPPI(remainingSafe(properties), propertyCountOutput, memAddressSafe(properties), __functionAddress); - } - - /** Array version of: {@link #xrEnumerateInstanceExtensionProperties EnumerateInstanceExtensionProperties} */ - @NativeType("XrResult") - public static int xrEnumerateInstanceExtensionProperties(@Nullable @NativeType("char const *") ByteBuffer layerName, @NativeType("uint32_t *") int[] propertyCountOutput, @Nullable @NativeType("XrExtensionProperties *") XrExtensionProperties.Buffer properties) { - long __functionAddress = XR.getGlobalCommands().xrEnumerateInstanceExtensionProperties; - if (CHECKS) { - checkNT1Safe(layerName); - check(propertyCountOutput, 1); - } - throw new RuntimeException("JNI call does not exist in LWJGL version"); -//return callPPPI(memAddressSafe(layerName), remainingSafe(properties), propertyCountOutput, memAddressSafe(properties), __functionAddress); - } - - /** Array version of: {@link #xrEnumerateInstanceExtensionProperties EnumerateInstanceExtensionProperties} */ - @NativeType("XrResult") - public static int xrEnumerateInstanceExtensionProperties(@Nullable @NativeType("char const *") CharSequence layerName, @NativeType("uint32_t *") int[] propertyCountOutput, @Nullable @NativeType("XrExtensionProperties *") XrExtensionProperties.Buffer properties) { - long __functionAddress = XR.getGlobalCommands().xrEnumerateInstanceExtensionProperties; - if (CHECKS) { - check(propertyCountOutput, 1); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8Safe(layerName, true); - long layerNameEncoded = layerName == null ? NULL : stack.getPointerAddress(); - throw new RuntimeException("JNI call does not exist in LWJGL version"); -//return callPPPI(layerNameEncoded, remainingSafe(properties), propertyCountOutput, memAddressSafe(properties), __functionAddress); - } finally { - stack.setPointer(stackPointer); - } - } - - /** Array version of: {@link #xrGetSystem GetSystem} */ - @NativeType("XrResult") - public static int xrGetSystem(XrInstance instance, @NativeType("XrSystemGetInfo const *") XrSystemGetInfo getInfo, @NativeType("XrSystemId *") long[] systemId) { - long __functionAddress = instance.getCapabilities().xrGetSystem; - if (CHECKS) { - check(systemId, 1); - } - return callPPPI(instance.address(), getInfo.address(), systemId, __functionAddress); - } - - /** Array version of: {@link #xrEnumerateEnvironmentBlendModes EnumerateEnvironmentBlendModes} */ - @NativeType("XrResult") - public static int xrEnumerateEnvironmentBlendModes(XrInstance instance, @NativeType("XrSystemId") long systemId, @NativeType("XrViewConfigurationType") int viewConfigurationType, @NativeType("uint32_t *") int[] environmentBlendModeCountOutput, @Nullable @NativeType("XrEnvironmentBlendMode *") int[] environmentBlendModes) { - long __functionAddress = instance.getCapabilities().xrEnumerateEnvironmentBlendModes; - if (CHECKS) { - check(environmentBlendModeCountOutput, 1); - } - throw new RuntimeException("JNI call does not exist in LWJGL version"); -//return callPJPPI(instance.address(), systemId, viewConfigurationType, lengthSafe(environmentBlendModes), environmentBlendModeCountOutput, environmentBlendModes, __functionAddress); - } - - /** Array version of: {@link #xrEnumerateReferenceSpaces EnumerateReferenceSpaces} */ - @NativeType("XrResult") - public static int xrEnumerateReferenceSpaces(XrSession session, @NativeType("uint32_t *") int[] spaceCountOutput, @Nullable @NativeType("XrReferenceSpaceType *") int[] spaces) { - long __functionAddress = session.getCapabilities().xrEnumerateReferenceSpaces; - if (CHECKS) { - check(spaceCountOutput, 1); - } - return callPPPI(session.address(), lengthSafe(spaces), spaceCountOutput, spaces, __functionAddress); - } - - /** Array version of: {@link #xrEnumerateViewConfigurations EnumerateViewConfigurations} */ - @NativeType("XrResult") - public static int xrEnumerateViewConfigurations(XrInstance instance, @NativeType("XrSystemId") long systemId, @NativeType("uint32_t *") int[] viewConfigurationTypeCountOutput, @Nullable @NativeType("XrViewConfigurationType *") int[] viewConfigurationTypes) { - long __functionAddress = instance.getCapabilities().xrEnumerateViewConfigurations; - if (CHECKS) { - check(viewConfigurationTypeCountOutput, 1); - } - return callPJPPI(instance.address(), systemId, lengthSafe(viewConfigurationTypes), viewConfigurationTypeCountOutput, viewConfigurationTypes, __functionAddress); - } - - /** Array version of: {@link #xrEnumerateViewConfigurationViews EnumerateViewConfigurationViews} */ - @NativeType("XrResult") - public static int xrEnumerateViewConfigurationViews(XrInstance instance, @NativeType("XrSystemId") long systemId, @NativeType("XrViewConfigurationType") int viewConfigurationType, @NativeType("uint32_t *") int[] viewCountOutput, @Nullable @NativeType("XrViewConfigurationView *") XrViewConfigurationView.Buffer views) { - long __functionAddress = instance.getCapabilities().xrEnumerateViewConfigurationViews; - if (CHECKS) { - check(viewCountOutput, 1); - } - throw new RuntimeException("JNI call does not exist in LWJGL version"); -//return callPJPPI(instance.address(), systemId, viewConfigurationType, remainingSafe(views), viewCountOutput, memAddressSafe(views), __functionAddress); - } - - /** Array version of: {@link #xrEnumerateSwapchainFormats EnumerateSwapchainFormats} */ - @NativeType("XrResult") - public static int xrEnumerateSwapchainFormats(XrSession session, @NativeType("uint32_t *") int[] formatCountOutput, @Nullable @NativeType("int64_t *") long[] formats) { - long __functionAddress = session.getCapabilities().xrEnumerateSwapchainFormats; - if (CHECKS) { - check(formatCountOutput, 1); - } - return callPPPI(session.address(), lengthSafe(formats), formatCountOutput, formats, __functionAddress); - } - - /** Array version of: {@link #xrEnumerateSwapchainImages EnumerateSwapchainImages} */ - @NativeType("XrResult") - public static int xrEnumerateSwapchainImages(XrSwapchain swapchain, @NativeType("uint32_t *") int[] imageCountOutput, @Nullable @NativeType("XrSwapchainImageBaseHeader *") XrSwapchainImageBaseHeader.Buffer images) { - long __functionAddress = swapchain.getCapabilities().xrEnumerateSwapchainImages; - if (CHECKS) { - check(imageCountOutput, 1); - } - throw new RuntimeException("JNI call does not exist in LWJGL version"); -//return callPPPI(swapchain.address(), remainingSafe(images), imageCountOutput, memAddressSafe(images), __functionAddress); - } - - /** Array version of: {@link #xrAcquireSwapchainImage AcquireSwapchainImage} */ - @NativeType("XrResult") - public static int xrAcquireSwapchainImage(XrSwapchain swapchain, @Nullable @NativeType("XrSwapchainImageAcquireInfo const *") XrSwapchainImageAcquireInfo acquireInfo, @NativeType("uint32_t *") int[] index) { - long __functionAddress = swapchain.getCapabilities().xrAcquireSwapchainImage; - if (CHECKS) { - check(index, 1); - } - return callPPPI(swapchain.address(), memAddressSafe(acquireInfo), index, __functionAddress); - } - - /** Array version of: {@link #xrLocateViews LocateViews} */ - @NativeType("XrResult") - public static int xrLocateViews(XrSession session, @NativeType("XrViewLocateInfo const *") XrViewLocateInfo viewLocateInfo, @NativeType("XrViewState *") XrViewState viewState, @NativeType("uint32_t *") int[] viewCountOutput, @Nullable @NativeType("XrView *") XrView.Buffer views) { - long __functionAddress = session.getCapabilities().xrLocateViews; - if (CHECKS) { - check(viewCountOutput, 1); - XrViewLocateInfo.validate(viewLocateInfo.address()); - } - throw new RuntimeException("JNI call does not exist in LWJGL version"); -//return callPPPPPI(session.address(), viewLocateInfo.address(), viewState.address(), remainingSafe(views), viewCountOutput, memAddressSafe(views), __functionAddress); - } - - /** Array version of: {@link #xrStringToPath StringToPath} */ - @NativeType("XrResult") - public static int xrStringToPath(XrInstance instance, @NativeType("char const *") ByteBuffer pathString, @NativeType("XrPath *") long[] path) { - long __functionAddress = instance.getCapabilities().xrStringToPath; - if (CHECKS) { - checkNT1(pathString); - check(path, 1); - } - return callPPPI(instance.address(), memAddress(pathString), path, __functionAddress); - } - - /** Array version of: {@link #xrStringToPath StringToPath} */ - @NativeType("XrResult") - public static int xrStringToPath(XrInstance instance, @NativeType("char const *") CharSequence pathString, @NativeType("XrPath *") long[] path) { - long __functionAddress = instance.getCapabilities().xrStringToPath; - if (CHECKS) { - check(path, 1); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(pathString, true); - long pathStringEncoded = stack.getPointerAddress(); - return callPPPI(instance.address(), pathStringEncoded, path, __functionAddress); - } finally { - stack.setPointer(stackPointer); - } - } - - /** Array version of: {@link #xrPathToString PathToString} */ - @NativeType("XrResult") - public static int xrPathToString(XrInstance instance, @NativeType("XrPath") long path, @NativeType("uint32_t *") int[] bufferCountOutput, @Nullable @NativeType("char *") ByteBuffer buffer) { - long __functionAddress = instance.getCapabilities().xrPathToString; - if (CHECKS) { - check(bufferCountOutput, 1); - } - throw new RuntimeException("JNI call does not exist in LWJGL version"); -//return callPJPPI(instance.address(), path, remainingSafe(buffer), bufferCountOutput, memAddressSafe(buffer), __functionAddress); - } - - /** Array version of: {@link #xrEnumerateBoundSourcesForAction EnumerateBoundSourcesForAction} */ - @NativeType("XrResult") - public static int xrEnumerateBoundSourcesForAction(XrSession session, @NativeType("XrBoundSourcesForActionEnumerateInfo const *") XrBoundSourcesForActionEnumerateInfo enumerateInfo, @NativeType("uint32_t *") int[] sourceCountOutput, @Nullable @NativeType("XrPath *") long[] sources) { - long __functionAddress = session.getCapabilities().xrEnumerateBoundSourcesForAction; - if (CHECKS) { - check(sourceCountOutput, 1); - XrBoundSourcesForActionEnumerateInfo.validate(enumerateInfo.address()); - } - throw new RuntimeException("JNI call does not exist in LWJGL version"); -//return callPPPPI(session.address(), enumerateInfo.address(), lengthSafe(sources), sourceCountOutput, sources, __functionAddress); - } - - /** Array version of: {@link #xrGetInputSourceLocalizedName GetInputSourceLocalizedName} */ - @NativeType("XrResult") - public static int xrGetInputSourceLocalizedName(XrSession session, @NativeType("XrInputSourceLocalizedNameGetInfo const *") XrInputSourceLocalizedNameGetInfo getInfo, @NativeType("uint32_t *") int[] bufferCountOutput, @Nullable @NativeType("char *") ByteBuffer buffer) { - long __functionAddress = session.getCapabilities().xrGetInputSourceLocalizedName; - if (CHECKS) { - check(bufferCountOutput, 1); - } - throw new RuntimeException("JNI call does not exist in LWJGL version"); -//return callPPPPI(session.address(), getInfo.address(), remainingSafe(buffer), bufferCountOutput, memAddressSafe(buffer), __functionAddress); - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XRCapabilities.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XRCapabilities.java deleted file mode 100644 index cd286674..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XRCapabilities.java +++ /dev/null @@ -1,1131 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.lwjgl.system.FunctionProvider; - -import java.util.Set; - -import static org.lwjgl.openxr.LWJGLCompat.*; - -/** Defines the capabilities of a OpenXR {@code XRInstance}. */ -public class XRCapabilities { - - // EXT_conformance_automation - public final long - xrSetInputDeviceActiveEXT, - xrSetInputDeviceStateBoolEXT, - xrSetInputDeviceStateFloatEXT, - xrSetInputDeviceStateVector2fEXT, - xrSetInputDeviceLocationEXT; - - // EXT_debug_utils - public final long - xrSetDebugUtilsObjectNameEXT, - xrCreateDebugUtilsMessengerEXT, - xrDestroyDebugUtilsMessengerEXT, - xrSubmitDebugUtilsMessageEXT, - xrSessionBeginDebugUtilsLabelRegionEXT, - xrSessionEndDebugUtilsLabelRegionEXT, - xrSessionInsertDebugUtilsLabelEXT; - - // EXT_hand_tracking - public final long - xrCreateHandTrackerEXT, - xrDestroyHandTrackerEXT, - xrLocateHandJointsEXT; - - // EXT_performance_settings - public final long - xrPerfSettingsSetPerformanceLevelEXT; - - // EXT_thermal_query - public final long - xrThermalGetTemperatureTrendEXT; - - // FB_color_space - public final long - xrEnumerateColorSpacesFB, - xrSetColorSpaceFB; - - // FB_display_refresh_rate - public final long - xrEnumerateDisplayRefreshRatesFB, - xrGetDisplayRefreshRateFB, - xrRequestDisplayRefreshRateFB; - - // FB_foveation - public final long - xrCreateFoveationProfileFB, - xrDestroyFoveationProfileFB; - - // FB_hand_tracking_mesh - public final long - xrGetHandMeshFB; - - // FB_passthrough - public final long - xrCreatePassthroughFB, - xrDestroyPassthroughFB, - xrPassthroughStartFB, - xrPassthroughPauseFB, - xrCreatePassthroughLayerFB, - xrDestroyPassthroughLayerFB, - xrPassthroughLayerPauseFB, - xrPassthroughLayerResumeFB, - xrPassthroughLayerSetStyleFB, - xrCreateGeometryInstanceFB, - xrDestroyGeometryInstanceFB, - xrGeometryInstanceSetTransformFB; - - // FB_swapchain_update_state - public final long - xrUpdateSwapchainFB, - xrGetSwapchainStateFB; - - // FB_triangle_mesh - public final long - xrCreateTriangleMeshFB, - xrDestroyTriangleMeshFB, - xrTriangleMeshGetVertexBufferFB, - xrTriangleMeshGetIndexBufferFB, - xrTriangleMeshBeginUpdateFB, - xrTriangleMeshEndUpdateFB, - xrTriangleMeshBeginVertexBufferUpdateFB, - xrTriangleMeshEndVertexBufferUpdateFB; - - // HTCX_vive_tracker_interaction - public final long - xrEnumerateViveTrackerPathsHTCX; - - // KHR_android_surface_swapchain - public final long - xrCreateSwapchainAndroidSurfaceKHR; - - // KHR_android_thread_settings - public final long - xrSetAndroidApplicationThreadKHR; - - // KHR_convert_timespec_time - public final long - xrConvertTimespecTimeToTimeKHR, - xrConvertTimeToTimespecTimeKHR; - - // KHR_opengl_enable - public final long - xrGetOpenGLGraphicsRequirementsKHR; - - // KHR_opengl_es_enable - public final long - xrGetOpenGLESGraphicsRequirementsKHR; - - // KHR_visibility_mask - public final long - xrGetVisibilityMaskKHR; - - // KHR_vulkan_enable - public final long - xrGetVulkanInstanceExtensionsKHR, - xrGetVulkanDeviceExtensionsKHR, - xrGetVulkanGraphicsDeviceKHR, - xrGetVulkanGraphicsRequirementsKHR; - - // KHR_vulkan_enable2 - public final long - xrCreateVulkanInstanceKHR, - xrCreateVulkanDeviceKHR, - xrGetVulkanGraphicsDevice2KHR, - xrGetVulkanGraphicsRequirements2KHR; - - // KHR_win32_convert_performance_counter_time - public final long - xrConvertWin32PerformanceCounterToTimeKHR, - xrConvertTimeToWin32PerformanceCounterKHR; - - // MSFT_composition_layer_reprojection - public final long - xrEnumerateReprojectionModesMSFT; - - // MSFT_controller_model - public final long - xrGetControllerModelKeyMSFT, - xrLoadControllerModelMSFT, - xrGetControllerModelPropertiesMSFT, - xrGetControllerModelStateMSFT; - - // MSFT_hand_tracking_mesh - public final long - xrCreateHandMeshSpaceMSFT, - xrUpdateHandMeshMSFT; - - // MSFT_perception_anchor_interop - public final long - xrCreateSpatialAnchorFromPerceptionAnchorMSFT, - xrTryGetPerceptionAnchorFromSpatialAnchorMSFT; - - // MSFT_scene_understanding - public final long - xrEnumerateSceneComputeFeaturesMSFT, - xrCreateSceneObserverMSFT, - xrDestroySceneObserverMSFT, - xrCreateSceneMSFT, - xrDestroySceneMSFT, - xrComputeNewSceneMSFT, - xrGetSceneComputeStateMSFT, - xrGetSceneComponentsMSFT, - xrLocateSceneComponentsMSFT, - xrGetSceneMeshBuffersMSFT; - - // MSFT_scene_understanding_serialization - public final long - xrDeserializeSceneMSFT, - xrGetSerializedSceneFragmentDataMSFT; - - // MSFT_spatial_anchor - public final long - xrCreateSpatialAnchorMSFT, - xrCreateSpatialAnchorSpaceMSFT, - xrDestroySpatialAnchorMSFT; - - // MSFT_spatial_anchor_persistence - public final long - xrCreateSpatialAnchorStoreConnectionMSFT, - xrDestroySpatialAnchorStoreConnectionMSFT, - xrPersistSpatialAnchorMSFT, - xrEnumeratePersistedSpatialAnchorNamesMSFT, - xrCreateSpatialAnchorFromPersistedNameMSFT, - xrUnpersistSpatialAnchorMSFT, - xrClearSpatialAnchorStoreMSFT; - - // MSFT_spatial_graph_bridge - public final long - xrCreateSpatialGraphNodeSpaceMSFT; - - // OCULUS_audio_device_guid - public final long - xrGetAudioOutputDeviceGuidOculus, - xrGetAudioInputDeviceGuidOculus; - - // VARJO_environment_depth_estimation - public final long - xrSetEnvironmentDepthEstimationVARJO; - - // VARJO_marker_tracking - public final long - xrSetMarkerTrackingVARJO, - xrSetMarkerTrackingTimeoutVARJO, - xrSetMarkerTrackingPredictionVARJO, - xrGetMarkerSizeVARJO, - xrCreateMarkerSpaceVARJO; - - // XR10 - public final long - xrDestroyInstance, - xrGetInstanceProperties, - xrPollEvent, - xrResultToString, - xrStructureTypeToString, - xrGetSystem, - xrGetSystemProperties, - xrEnumerateEnvironmentBlendModes, - xrCreateSession, - xrDestroySession, - xrEnumerateReferenceSpaces, - xrCreateReferenceSpace, - xrGetReferenceSpaceBoundsRect, - xrCreateActionSpace, - xrLocateSpace, - xrDestroySpace, - xrEnumerateViewConfigurations, - xrGetViewConfigurationProperties, - xrEnumerateViewConfigurationViews, - xrEnumerateSwapchainFormats, - xrCreateSwapchain, - xrDestroySwapchain, - xrEnumerateSwapchainImages, - xrAcquireSwapchainImage, - xrWaitSwapchainImage, - xrReleaseSwapchainImage, - xrBeginSession, - xrEndSession, - xrRequestExitSession, - xrWaitFrame, - xrBeginFrame, - xrEndFrame, - xrLocateViews, - xrStringToPath, - xrPathToString, - xrCreateActionSet, - xrDestroyActionSet, - xrCreateAction, - xrDestroyAction, - xrSuggestInteractionProfileBindings, - xrAttachSessionActionSets, - xrGetCurrentInteractionProfile, - xrGetActionStateBoolean, - xrGetActionStateFloat, - xrGetActionStateVector2f, - xrGetActionStatePose, - xrSyncActions, - xrEnumerateBoundSourcesForAction, - xrGetInputSourceLocalizedName, - xrApplyHapticFeedback, - xrStopHapticFeedback; - - /** The OpenXR API version number. */ - public final long apiVersion; - - /** When true, {@link EPICViewConfigurationFov} is supported. */ - public final boolean XR_EPIC_view_configuration_fov; - /** When true, {@link EXTConformanceAutomation} is supported. */ - public final boolean XR_EXT_conformance_automation; - /** When true, {@link EXTDebugUtils} is supported. */ - public final boolean XR_EXT_debug_utils; - /** When true, {@link EXTEyeGazeInteraction} is supported. */ - public final boolean XR_EXT_eye_gaze_interaction; - /** When true, {@link EXTHandJointsMotionRange} is supported. */ - public final boolean XR_EXT_hand_joints_motion_range; - /** When true, {@link EXTHandTracking} is supported. */ - public final boolean XR_EXT_hand_tracking; - /** When true, {@link EXTHpMixedRealityController} is supported. */ - public final boolean XR_EXT_hp_mixed_reality_controller; - /** When true, {@link EXTPerformanceSettings} is supported. */ - public final boolean XR_EXT_performance_settings; - /** When true, {@link EXTSamsungOdysseyController} is supported. */ - public final boolean XR_EXT_samsung_odyssey_controller; - /** When true, {@link EXTThermalQuery} is supported. */ - public final boolean XR_EXT_thermal_query; - /** When true, {@link EXTViewConfigurationDepthRange} is supported. */ - public final boolean XR_EXT_view_configuration_depth_range; - /** When true, {@link EXTWin32AppcontainerCompatible} is supported. */ - public final boolean XR_EXT_win32_appcontainer_compatible; - /** When true, {@link EXTXOverlay} is supported. */ - public final boolean XR_EXTX_overlay; - /** When true, {@link FBAndroidSurfaceSwapchainCreate} is supported. */ - public final boolean XR_FB_android_surface_swapchain_create; - /** When true, {@link FBColorSpace} is supported. */ - public final boolean XR_FB_color_space; - /** When true, {@link FBCompositionLayerAlphaBlend} is supported. */ - public final boolean XR_FB_composition_layer_alpha_blend; - /** When true, {@link FBCompositionLayerImageLayout} is supported. */ - public final boolean XR_FB_composition_layer_image_layout; - /** When true, {@link FBCompositionLayerSecureContent} is supported. */ - public final boolean XR_FB_composition_layer_secure_content; - /** When true, {@link FBDisplayRefreshRate} is supported. */ - public final boolean XR_FB_display_refresh_rate; - /** When true, {@link FBFoveation} is supported. */ - public final boolean XR_FB_foveation; - /** When true, {@link FBFoveationConfiguration} is supported. */ - public final boolean XR_FB_foveation_configuration; - /** When true, {@link FBFoveationVulkan} is supported. */ - public final boolean XR_FB_foveation_vulkan; - /** When true, {@link FBHandTrackingAim} is supported. */ - public final boolean XR_FB_hand_tracking_aim; - /** When true, {@link FBHandTrackingCapsules} is supported. */ - public final boolean XR_FB_hand_tracking_capsules; - /** When true, {@link FBHandTrackingMesh} is supported. */ - public final boolean XR_FB_hand_tracking_mesh; - /** When true, {@link FBPassthrough} is supported. */ - public final boolean XR_FB_passthrough; - /** When true, {@link FBSpaceWarp} is supported. */ - public final boolean XR_FB_space_warp; - /** When true, {@link FBSwapchainUpdateState} is supported. */ - public final boolean XR_FB_swapchain_update_state; - /** When true, {@link FBSwapchainUpdateStateAndroidSurface} is supported. */ - public final boolean XR_FB_swapchain_update_state_android_surface; - /** When true, {@link FBSwapchainUpdateStateOpenglEs} is supported. */ - public final boolean XR_FB_swapchain_update_state_opengl_es; - /** When true, {@link FBSwapchainUpdateStateVulkan} is supported. */ - public final boolean XR_FB_swapchain_update_state_vulkan; - /** When true, {@link FBTriangleMesh} is supported. */ - public final boolean XR_FB_triangle_mesh; - /** When true, {@link HTCViveCosmosControllerInteraction} is supported. */ - public final boolean XR_HTC_vive_cosmos_controller_interaction; - /** When true, {@link HTCXViveTrackerInteraction} is supported. */ - public final boolean XR_HTCX_vive_tracker_interaction; - /** When true, {@link HUAWEIControllerInteraction} is supported. */ - public final boolean XR_HUAWEI_controller_interaction; - /** When true, {@link KHRAndroidCreateInstance} is supported. */ - public final boolean XR_KHR_android_create_instance; - /** When true, {@link KHRAndroidSurfaceSwapchain} is supported. */ - public final boolean XR_KHR_android_surface_swapchain; - /** When true, {@link KHRAndroidThreadSettings} is supported. */ - public final boolean XR_KHR_android_thread_settings; - /** When true, {@link KHRBindingModification} is supported. */ - public final boolean XR_KHR_binding_modification; - /** When true, {@link KHRCompositionLayerColorScaleBias} is supported. */ - public final boolean XR_KHR_composition_layer_color_scale_bias; - /** When true, {@link KHRCompositionLayerCube} is supported. */ - public final boolean XR_KHR_composition_layer_cube; - /** When true, {@link KHRCompositionLayerCylinder} is supported. */ - public final boolean XR_KHR_composition_layer_cylinder; - /** When true, {@link KHRCompositionLayerDepth} is supported. */ - public final boolean XR_KHR_composition_layer_depth; - /** When true, {@link KHRCompositionLayerEquirect} is supported. */ - public final boolean XR_KHR_composition_layer_equirect; - /** When true, {@link KHRCompositionLayerEquirect2} is supported. */ - public final boolean XR_KHR_composition_layer_equirect2; - /** When true, {@link KHRConvertTimespecTime} is supported. */ - public final boolean XR_KHR_convert_timespec_time; - /** When true, {@link KHRLoaderInit} is supported. */ - public final boolean XR_KHR_loader_init; - /** When true, {@link KHRLoaderInitAndroid} is supported. */ - public final boolean XR_KHR_loader_init_android; - /** When true, {@link KHROpenglEnable} is supported. */ - public final boolean XR_KHR_opengl_enable; - /** When true, {@link KHROpenglEsEnable} is supported. */ - public final boolean XR_KHR_opengl_es_enable; - /** When true, {@link KHRSwapchainUsageInputAttachmentBit} is supported. */ - public final boolean XR_KHR_swapchain_usage_input_attachment_bit; - /** When true, {@link KHRVisibilityMask} is supported. */ - public final boolean XR_KHR_visibility_mask; - /** When true, {@link KHRVulkanEnable} is supported. */ - public final boolean XR_KHR_vulkan_enable; - /** When true, {@link KHRVulkanEnable2} is supported. */ - public final boolean XR_KHR_vulkan_enable2; - /** When true, {@link KHRVulkanSwapchainFormatList} is supported. */ - public final boolean XR_KHR_vulkan_swapchain_format_list; - /** When true, {@link KHRWin32ConvertPerformanceCounterTime} is supported. */ - public final boolean XR_KHR_win32_convert_performance_counter_time; - /** When true, {@link MNDHeadless} is supported. */ - public final boolean XR_MND_headless; - /** When true, {@link MNDSwapchainUsageInputAttachmentBit} is supported. */ - public final boolean XR_MND_swapchain_usage_input_attachment_bit; - /** When true, {@link MNDXEglEnable} is supported. */ - public final boolean XR_MNDX_egl_enable; - /** When true, {@link MSFTCompositionLayerReprojection} is supported. */ - public final boolean XR_MSFT_composition_layer_reprojection; - /** When true, {@link MSFTControllerModel} is supported. */ - public final boolean XR_MSFT_controller_model; - /** When true, {@link MSFTFirstPersonObserver} is supported. */ - public final boolean XR_MSFT_first_person_observer; - /** When true, {@link MSFTHandInteraction} is supported. */ - public final boolean XR_MSFT_hand_interaction; - /** When true, {@link MSFTHandTrackingMesh} is supported. */ - public final boolean XR_MSFT_hand_tracking_mesh; - /** When true, {@link MSFTHolographicWindowAttachment} is supported. */ - public final boolean XR_MSFT_holographic_window_attachment; - /** When true, {@link MSFTPerceptionAnchorInterop} is supported. */ - public final boolean XR_MSFT_perception_anchor_interop; - /** When true, {@link MSFTSceneUnderstanding} is supported. */ - public final boolean XR_MSFT_scene_understanding; - /** When true, {@link MSFTSceneUnderstandingSerialization} is supported. */ - public final boolean XR_MSFT_scene_understanding_serialization; - /** When true, {@link MSFTSecondaryViewConfiguration} is supported. */ - public final boolean XR_MSFT_secondary_view_configuration; - /** When true, {@link MSFTSpatialAnchor} is supported. */ - public final boolean XR_MSFT_spatial_anchor; - /** When true, {@link MSFTSpatialAnchorPersistence} is supported. */ - public final boolean XR_MSFT_spatial_anchor_persistence; - /** When true, {@link MSFTSpatialGraphBridge} is supported. */ - public final boolean XR_MSFT_spatial_graph_bridge; - /** When true, {@link MSFTUnboundedReferenceSpace} is supported. */ - public final boolean XR_MSFT_unbounded_reference_space; - /** When true, {@link OCULUSAndroidSessionStateEnable} is supported. */ - public final boolean XR_OCULUS_android_session_state_enable; - /** When true, {@link OCULUSAudioDeviceGuid} is supported. */ - public final boolean XR_OCULUS_audio_device_guid; - /** When true, {@link VALVEAnalogThreshold} is supported. */ - public final boolean XR_VALVE_analog_threshold; - /** When true, {@link VARJOCompositionLayerDepthTest} is supported. */ - public final boolean XR_VARJO_composition_layer_depth_test; - /** When true, {@link VARJOEnvironmentDepthEstimation} is supported. */ - public final boolean XR_VARJO_environment_depth_estimation; - /** When true, {@link VARJOFoveatedRendering} is supported. */ - public final boolean XR_VARJO_foveated_rendering; - /** When true, {@link VARJOMarkerTracking} is supported. */ - public final boolean XR_VARJO_marker_tracking; - /** When true, {@link VARJOQuadViews} is supported. */ - public final boolean XR_VARJO_quad_views; - /** When true, {@link XR10} is supported. */ - public final boolean OpenXR10; - - XRCapabilities(FunctionProvider provider, long apiVersion, Set ext, Set deviceExt) { - this.apiVersion = apiVersion; - - long[] caps = new long[156]; - - XR_EPIC_view_configuration_fov = ext.contains("XR_EPIC_view_configuration_fov"); - XR_EXT_conformance_automation = check_EXT_conformance_automation(provider, caps, ext); - XR_EXT_debug_utils = check_EXT_debug_utils(provider, caps, ext); - XR_EXT_eye_gaze_interaction = ext.contains("XR_EXT_eye_gaze_interaction"); - XR_EXT_hand_joints_motion_range = ext.contains("XR_EXT_hand_joints_motion_range"); - XR_EXT_hand_tracking = check_EXT_hand_tracking(provider, caps, ext); - XR_EXT_hp_mixed_reality_controller = ext.contains("XR_EXT_hp_mixed_reality_controller"); - XR_EXT_performance_settings = check_EXT_performance_settings(provider, caps, ext); - XR_EXT_samsung_odyssey_controller = ext.contains("XR_EXT_samsung_odyssey_controller"); - XR_EXT_thermal_query = check_EXT_thermal_query(provider, caps, ext); - XR_EXT_view_configuration_depth_range = ext.contains("XR_EXT_view_configuration_depth_range"); - XR_EXT_win32_appcontainer_compatible = ext.contains("XR_EXT_win32_appcontainer_compatible"); - XR_EXTX_overlay = ext.contains("XR_EXTX_overlay"); - XR_FB_android_surface_swapchain_create = ext.contains("XR_FB_android_surface_swapchain_create"); - XR_FB_color_space = check_FB_color_space(provider, caps, ext); - XR_FB_composition_layer_alpha_blend = ext.contains("XR_FB_composition_layer_alpha_blend"); - XR_FB_composition_layer_image_layout = ext.contains("XR_FB_composition_layer_image_layout"); - XR_FB_composition_layer_secure_content = ext.contains("XR_FB_composition_layer_secure_content"); - XR_FB_display_refresh_rate = check_FB_display_refresh_rate(provider, caps, ext); - XR_FB_foveation = check_FB_foveation(provider, caps, ext); - XR_FB_foveation_configuration = ext.contains("XR_FB_foveation_configuration"); - XR_FB_foveation_vulkan = ext.contains("XR_FB_foveation_vulkan"); - XR_FB_hand_tracking_aim = ext.contains("XR_FB_hand_tracking_aim"); - XR_FB_hand_tracking_capsules = ext.contains("XR_FB_hand_tracking_capsules"); - XR_FB_hand_tracking_mesh = check_FB_hand_tracking_mesh(provider, caps, ext); - XR_FB_passthrough = check_FB_passthrough(provider, caps, ext); - XR_FB_space_warp = ext.contains("XR_FB_space_warp"); - XR_FB_swapchain_update_state = check_FB_swapchain_update_state(provider, caps, ext); - XR_FB_swapchain_update_state_android_surface = ext.contains("XR_FB_swapchain_update_state_android_surface"); - XR_FB_swapchain_update_state_opengl_es = ext.contains("XR_FB_swapchain_update_state_opengl_es"); - XR_FB_swapchain_update_state_vulkan = ext.contains("XR_FB_swapchain_update_state_vulkan"); - XR_FB_triangle_mesh = check_FB_triangle_mesh(provider, caps, ext); - XR_HTC_vive_cosmos_controller_interaction = ext.contains("XR_HTC_vive_cosmos_controller_interaction"); - XR_HTCX_vive_tracker_interaction = check_HTCX_vive_tracker_interaction(provider, caps, ext); - XR_HUAWEI_controller_interaction = ext.contains("XR_HUAWEI_controller_interaction"); - XR_KHR_android_create_instance = ext.contains("XR_KHR_android_create_instance"); - XR_KHR_android_surface_swapchain = check_KHR_android_surface_swapchain(provider, caps, ext); - XR_KHR_android_thread_settings = check_KHR_android_thread_settings(provider, caps, ext); - XR_KHR_binding_modification = ext.contains("XR_KHR_binding_modification"); - XR_KHR_composition_layer_color_scale_bias = ext.contains("XR_KHR_composition_layer_color_scale_bias"); - XR_KHR_composition_layer_cube = ext.contains("XR_KHR_composition_layer_cube"); - XR_KHR_composition_layer_cylinder = ext.contains("XR_KHR_composition_layer_cylinder"); - XR_KHR_composition_layer_depth = ext.contains("XR_KHR_composition_layer_depth"); - XR_KHR_composition_layer_equirect = ext.contains("XR_KHR_composition_layer_equirect"); - XR_KHR_composition_layer_equirect2 = ext.contains("XR_KHR_composition_layer_equirect2"); - XR_KHR_convert_timespec_time = check_KHR_convert_timespec_time(provider, caps, ext); - XR_KHR_loader_init = ext.contains("XR_KHR_loader_init"); - XR_KHR_loader_init_android = ext.contains("XR_KHR_loader_init_android"); - XR_KHR_opengl_enable = check_KHR_opengl_enable(provider, caps, ext); - XR_KHR_opengl_es_enable = check_KHR_opengl_es_enable(provider, caps, ext); - XR_KHR_swapchain_usage_input_attachment_bit = ext.contains("XR_KHR_swapchain_usage_input_attachment_bit"); - XR_KHR_visibility_mask = check_KHR_visibility_mask(provider, caps, ext); - XR_KHR_vulkan_enable = check_KHR_vulkan_enable(provider, caps, ext); - XR_KHR_vulkan_enable2 = check_KHR_vulkan_enable2(provider, caps, ext); - XR_KHR_vulkan_swapchain_format_list = ext.contains("XR_KHR_vulkan_swapchain_format_list"); - XR_KHR_win32_convert_performance_counter_time = check_KHR_win32_convert_performance_counter_time(provider, caps, ext); - XR_MND_headless = ext.contains("XR_MND_headless"); - XR_MND_swapchain_usage_input_attachment_bit = ext.contains("XR_MND_swapchain_usage_input_attachment_bit"); - XR_MNDX_egl_enable = ext.contains("XR_MNDX_egl_enable"); - XR_MSFT_composition_layer_reprojection = check_MSFT_composition_layer_reprojection(provider, caps, ext); - XR_MSFT_controller_model = check_MSFT_controller_model(provider, caps, ext); - XR_MSFT_first_person_observer = ext.contains("XR_MSFT_first_person_observer"); - XR_MSFT_hand_interaction = ext.contains("XR_MSFT_hand_interaction"); - XR_MSFT_hand_tracking_mesh = check_MSFT_hand_tracking_mesh(provider, caps, ext); - XR_MSFT_holographic_window_attachment = ext.contains("XR_MSFT_holographic_window_attachment"); - XR_MSFT_perception_anchor_interop = check_MSFT_perception_anchor_interop(provider, caps, ext); - XR_MSFT_scene_understanding = check_MSFT_scene_understanding(provider, caps, ext); - XR_MSFT_scene_understanding_serialization = check_MSFT_scene_understanding_serialization(provider, caps, ext); - XR_MSFT_secondary_view_configuration = ext.contains("XR_MSFT_secondary_view_configuration"); - XR_MSFT_spatial_anchor = check_MSFT_spatial_anchor(provider, caps, ext); - XR_MSFT_spatial_anchor_persistence = check_MSFT_spatial_anchor_persistence(provider, caps, ext); - XR_MSFT_spatial_graph_bridge = check_MSFT_spatial_graph_bridge(provider, caps, ext); - XR_MSFT_unbounded_reference_space = ext.contains("XR_MSFT_unbounded_reference_space"); - XR_OCULUS_android_session_state_enable = ext.contains("XR_OCULUS_android_session_state_enable"); - XR_OCULUS_audio_device_guid = check_OCULUS_audio_device_guid(provider, caps, ext); - XR_VALVE_analog_threshold = ext.contains("XR_VALVE_analog_threshold"); - XR_VARJO_composition_layer_depth_test = ext.contains("XR_VARJO_composition_layer_depth_test"); - XR_VARJO_environment_depth_estimation = check_VARJO_environment_depth_estimation(provider, caps, ext); - XR_VARJO_foveated_rendering = ext.contains("XR_VARJO_foveated_rendering"); - XR_VARJO_marker_tracking = check_VARJO_marker_tracking(provider, caps, ext); - XR_VARJO_quad_views = ext.contains("XR_VARJO_quad_views"); - OpenXR10 = check_XR10(provider, caps, ext); - - xrSetInputDeviceActiveEXT = caps[0]; - xrSetInputDeviceStateBoolEXT = caps[1]; - xrSetInputDeviceStateFloatEXT = caps[2]; - xrSetInputDeviceStateVector2fEXT = caps[3]; - xrSetInputDeviceLocationEXT = caps[4]; - xrSetDebugUtilsObjectNameEXT = caps[5]; - xrCreateDebugUtilsMessengerEXT = caps[6]; - xrDestroyDebugUtilsMessengerEXT = caps[7]; - xrSubmitDebugUtilsMessageEXT = caps[8]; - xrSessionBeginDebugUtilsLabelRegionEXT = caps[9]; - xrSessionEndDebugUtilsLabelRegionEXT = caps[10]; - xrSessionInsertDebugUtilsLabelEXT = caps[11]; - xrCreateHandTrackerEXT = caps[12]; - xrDestroyHandTrackerEXT = caps[13]; - xrLocateHandJointsEXT = caps[14]; - xrPerfSettingsSetPerformanceLevelEXT = caps[15]; - xrThermalGetTemperatureTrendEXT = caps[16]; - xrEnumerateColorSpacesFB = caps[17]; - xrSetColorSpaceFB = caps[18]; - xrEnumerateDisplayRefreshRatesFB = caps[19]; - xrGetDisplayRefreshRateFB = caps[20]; - xrRequestDisplayRefreshRateFB = caps[21]; - xrCreateFoveationProfileFB = caps[22]; - xrDestroyFoveationProfileFB = caps[23]; - xrGetHandMeshFB = caps[24]; - xrCreatePassthroughFB = caps[25]; - xrDestroyPassthroughFB = caps[26]; - xrPassthroughStartFB = caps[27]; - xrPassthroughPauseFB = caps[28]; - xrCreatePassthroughLayerFB = caps[29]; - xrDestroyPassthroughLayerFB = caps[30]; - xrPassthroughLayerPauseFB = caps[31]; - xrPassthroughLayerResumeFB = caps[32]; - xrPassthroughLayerSetStyleFB = caps[33]; - xrCreateGeometryInstanceFB = caps[34]; - xrDestroyGeometryInstanceFB = caps[35]; - xrGeometryInstanceSetTransformFB = caps[36]; - xrUpdateSwapchainFB = caps[37]; - xrGetSwapchainStateFB = caps[38]; - xrCreateTriangleMeshFB = caps[39]; - xrDestroyTriangleMeshFB = caps[40]; - xrTriangleMeshGetVertexBufferFB = caps[41]; - xrTriangleMeshGetIndexBufferFB = caps[42]; - xrTriangleMeshBeginUpdateFB = caps[43]; - xrTriangleMeshEndUpdateFB = caps[44]; - xrTriangleMeshBeginVertexBufferUpdateFB = caps[45]; - xrTriangleMeshEndVertexBufferUpdateFB = caps[46]; - xrEnumerateViveTrackerPathsHTCX = caps[47]; - xrCreateSwapchainAndroidSurfaceKHR = caps[48]; - xrSetAndroidApplicationThreadKHR = caps[49]; - xrConvertTimespecTimeToTimeKHR = caps[50]; - xrConvertTimeToTimespecTimeKHR = caps[51]; - xrGetOpenGLGraphicsRequirementsKHR = caps[52]; - xrGetOpenGLESGraphicsRequirementsKHR = caps[53]; - xrGetVisibilityMaskKHR = caps[54]; - xrGetVulkanInstanceExtensionsKHR = caps[55]; - xrGetVulkanDeviceExtensionsKHR = caps[56]; - xrGetVulkanGraphicsDeviceKHR = caps[57]; - xrGetVulkanGraphicsRequirementsKHR = caps[58]; - xrCreateVulkanInstanceKHR = caps[59]; - xrCreateVulkanDeviceKHR = caps[60]; - xrGetVulkanGraphicsDevice2KHR = caps[61]; - xrGetVulkanGraphicsRequirements2KHR = caps[62]; - xrConvertWin32PerformanceCounterToTimeKHR = caps[63]; - xrConvertTimeToWin32PerformanceCounterKHR = caps[64]; - xrEnumerateReprojectionModesMSFT = caps[65]; - xrGetControllerModelKeyMSFT = caps[66]; - xrLoadControllerModelMSFT = caps[67]; - xrGetControllerModelPropertiesMSFT = caps[68]; - xrGetControllerModelStateMSFT = caps[69]; - xrCreateHandMeshSpaceMSFT = caps[70]; - xrUpdateHandMeshMSFT = caps[71]; - xrCreateSpatialAnchorFromPerceptionAnchorMSFT = caps[72]; - xrTryGetPerceptionAnchorFromSpatialAnchorMSFT = caps[73]; - xrEnumerateSceneComputeFeaturesMSFT = caps[74]; - xrCreateSceneObserverMSFT = caps[75]; - xrDestroySceneObserverMSFT = caps[76]; - xrCreateSceneMSFT = caps[77]; - xrDestroySceneMSFT = caps[78]; - xrComputeNewSceneMSFT = caps[79]; - xrGetSceneComputeStateMSFT = caps[80]; - xrGetSceneComponentsMSFT = caps[81]; - xrLocateSceneComponentsMSFT = caps[82]; - xrGetSceneMeshBuffersMSFT = caps[83]; - xrDeserializeSceneMSFT = caps[84]; - xrGetSerializedSceneFragmentDataMSFT = caps[85]; - xrCreateSpatialAnchorMSFT = caps[86]; - xrCreateSpatialAnchorSpaceMSFT = caps[87]; - xrDestroySpatialAnchorMSFT = caps[88]; - xrCreateSpatialAnchorStoreConnectionMSFT = caps[89]; - xrDestroySpatialAnchorStoreConnectionMSFT = caps[90]; - xrPersistSpatialAnchorMSFT = caps[91]; - xrEnumeratePersistedSpatialAnchorNamesMSFT = caps[92]; - xrCreateSpatialAnchorFromPersistedNameMSFT = caps[93]; - xrUnpersistSpatialAnchorMSFT = caps[94]; - xrClearSpatialAnchorStoreMSFT = caps[95]; - xrCreateSpatialGraphNodeSpaceMSFT = caps[96]; - xrGetAudioOutputDeviceGuidOculus = caps[97]; - xrGetAudioInputDeviceGuidOculus = caps[98]; - xrSetEnvironmentDepthEstimationVARJO = caps[99]; - xrSetMarkerTrackingVARJO = caps[100]; - xrSetMarkerTrackingTimeoutVARJO = caps[101]; - xrSetMarkerTrackingPredictionVARJO = caps[102]; - xrGetMarkerSizeVARJO = caps[103]; - xrCreateMarkerSpaceVARJO = caps[104]; - xrDestroyInstance = caps[105]; - xrGetInstanceProperties = caps[106]; - xrPollEvent = caps[107]; - xrResultToString = caps[108]; - xrStructureTypeToString = caps[109]; - xrGetSystem = caps[110]; - xrGetSystemProperties = caps[111]; - xrEnumerateEnvironmentBlendModes = caps[112]; - xrCreateSession = caps[113]; - xrDestroySession = caps[114]; - xrEnumerateReferenceSpaces = caps[115]; - xrCreateReferenceSpace = caps[116]; - xrGetReferenceSpaceBoundsRect = caps[117]; - xrCreateActionSpace = caps[118]; - xrLocateSpace = caps[119]; - xrDestroySpace = caps[120]; - xrEnumerateViewConfigurations = caps[121]; - xrGetViewConfigurationProperties = caps[122]; - xrEnumerateViewConfigurationViews = caps[123]; - xrEnumerateSwapchainFormats = caps[124]; - xrCreateSwapchain = caps[125]; - xrDestroySwapchain = caps[126]; - xrEnumerateSwapchainImages = caps[127]; - xrAcquireSwapchainImage = caps[128]; - xrWaitSwapchainImage = caps[129]; - xrReleaseSwapchainImage = caps[130]; - xrBeginSession = caps[131]; - xrEndSession = caps[132]; - xrRequestExitSession = caps[133]; - xrWaitFrame = caps[134]; - xrBeginFrame = caps[135]; - xrEndFrame = caps[136]; - xrLocateViews = caps[137]; - xrStringToPath = caps[138]; - xrPathToString = caps[139]; - xrCreateActionSet = caps[140]; - xrDestroyActionSet = caps[141]; - xrCreateAction = caps[142]; - xrDestroyAction = caps[143]; - xrSuggestInteractionProfileBindings = caps[144]; - xrAttachSessionActionSets = caps[145]; - xrGetCurrentInteractionProfile = caps[146]; - xrGetActionStateBoolean = caps[147]; - xrGetActionStateFloat = caps[148]; - xrGetActionStateVector2f = caps[149]; - xrGetActionStatePose = caps[150]; - xrSyncActions = caps[151]; - xrEnumerateBoundSourcesForAction = caps[152]; - xrGetInputSourceLocalizedName = caps[153]; - xrApplyHapticFeedback = caps[154]; - xrStopHapticFeedback = caps[155]; - } - - private static boolean check_EXT_conformance_automation(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("XR_EXT_conformance_automation")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 0, 1, 2, 3, 4 - }, - "xrSetInputDeviceActiveEXT", "xrSetInputDeviceStateBoolEXT", "xrSetInputDeviceStateFloatEXT", "xrSetInputDeviceStateVector2fEXT", - "xrSetInputDeviceLocationEXT" - ) || reportMissing("XR", "XR_EXT_conformance_automation"); - } - - private static boolean check_EXT_debug_utils(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("XR_EXT_debug_utils")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 5, 6, 7, 8, 9, 10, 11 - }, - "xrSetDebugUtilsObjectNameEXT", "xrCreateDebugUtilsMessengerEXT", "xrDestroyDebugUtilsMessengerEXT", "xrSubmitDebugUtilsMessageEXT", - "xrSessionBeginDebugUtilsLabelRegionEXT", "xrSessionEndDebugUtilsLabelRegionEXT", "xrSessionInsertDebugUtilsLabelEXT" - ) || reportMissing("XR", "XR_EXT_debug_utils"); - } - - private static boolean check_EXT_hand_tracking(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("XR_EXT_hand_tracking")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 12, 13, 14 - }, - "xrCreateHandTrackerEXT", "xrDestroyHandTrackerEXT", "xrLocateHandJointsEXT" - ) || reportMissing("XR", "XR_EXT_hand_tracking"); - } - - private static boolean check_EXT_performance_settings(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("XR_EXT_performance_settings")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 15 - }, - "xrPerfSettingsSetPerformanceLevelEXT" - ) || reportMissing("XR", "XR_EXT_performance_settings"); - } - - private static boolean check_EXT_thermal_query(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("XR_EXT_thermal_query")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 16 - }, - "xrThermalGetTemperatureTrendEXT" - ) || reportMissing("XR", "XR_EXT_thermal_query"); - } - - private static boolean check_FB_color_space(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("XR_FB_color_space")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 17, 18 - }, - "xrEnumerateColorSpacesFB", "xrSetColorSpaceFB" - ) || reportMissing("XR", "XR_FB_color_space"); - } - - private static boolean check_FB_display_refresh_rate(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("XR_FB_display_refresh_rate")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 19, 20, 21 - }, - "xrEnumerateDisplayRefreshRatesFB", "xrGetDisplayRefreshRateFB", "xrRequestDisplayRefreshRateFB" - ) || reportMissing("XR", "XR_FB_display_refresh_rate"); - } - - private static boolean check_FB_foveation(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("XR_FB_foveation")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 22, 23 - }, - "xrCreateFoveationProfileFB", "xrDestroyFoveationProfileFB" - ) || reportMissing("XR", "XR_FB_foveation"); - } - - private static boolean check_FB_hand_tracking_mesh(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("XR_FB_hand_tracking_mesh")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 24 - }, - "xrGetHandMeshFB" - ) || reportMissing("XR", "XR_FB_hand_tracking_mesh"); - } - - private static boolean check_FB_passthrough(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("XR_FB_passthrough")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36 - }, - "xrCreatePassthroughFB", "xrDestroyPassthroughFB", "xrPassthroughStartFB", "xrPassthroughPauseFB", "xrCreatePassthroughLayerFB", - "xrDestroyPassthroughLayerFB", "xrPassthroughLayerPauseFB", "xrPassthroughLayerResumeFB", "xrPassthroughLayerSetStyleFB", - "xrCreateGeometryInstanceFB", "xrDestroyGeometryInstanceFB", "xrGeometryInstanceSetTransformFB" - ) || reportMissing("XR", "XR_FB_passthrough"); - } - - private static boolean check_FB_swapchain_update_state(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("XR_FB_swapchain_update_state")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 37, 38 - }, - "xrUpdateSwapchainFB", "xrGetSwapchainStateFB" - ) || reportMissing("XR", "XR_FB_swapchain_update_state"); - } - - private static boolean check_FB_triangle_mesh(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("XR_FB_triangle_mesh")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 39, 40, 41, 42, 43, 44, 45, 46 - }, - "xrCreateTriangleMeshFB", "xrDestroyTriangleMeshFB", "xrTriangleMeshGetVertexBufferFB", "xrTriangleMeshGetIndexBufferFB", - "xrTriangleMeshBeginUpdateFB", "xrTriangleMeshEndUpdateFB", "xrTriangleMeshBeginVertexBufferUpdateFB", "xrTriangleMeshEndVertexBufferUpdateFB" - ) || reportMissing("XR", "XR_FB_triangle_mesh"); - } - - private static boolean check_HTCX_vive_tracker_interaction(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("XR_HTCX_vive_tracker_interaction")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 47 - }, - "xrEnumerateViveTrackerPathsHTCX" - ) || reportMissing("XR", "XR_HTCX_vive_tracker_interaction"); - } - - private static boolean check_KHR_android_surface_swapchain(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("XR_KHR_android_surface_swapchain")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 48 - }, - "xrCreateSwapchainAndroidSurfaceKHR" - ) || reportMissing("XR", "XR_KHR_android_surface_swapchain"); - } - - private static boolean check_KHR_android_thread_settings(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("XR_KHR_android_thread_settings")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 49 - }, - "xrSetAndroidApplicationThreadKHR" - ) || reportMissing("XR", "XR_KHR_android_thread_settings"); - } - - private static boolean check_KHR_convert_timespec_time(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("XR_KHR_convert_timespec_time")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 50, 51 - }, - "xrConvertTimespecTimeToTimeKHR", "xrConvertTimeToTimespecTimeKHR" - ) || reportMissing("XR", "XR_KHR_convert_timespec_time"); - } - - private static boolean check_KHR_opengl_enable(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("XR_KHR_opengl_enable")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 52 - }, - "xrGetOpenGLGraphicsRequirementsKHR" - ) || reportMissing("XR", "XR_KHR_opengl_enable"); - } - - private static boolean check_KHR_opengl_es_enable(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("XR_KHR_opengl_es_enable")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 53 - }, - "xrGetOpenGLESGraphicsRequirementsKHR" - ) || reportMissing("XR", "XR_KHR_opengl_es_enable"); - } - - private static boolean check_KHR_visibility_mask(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("XR_KHR_visibility_mask")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 54 - }, - "xrGetVisibilityMaskKHR" - ) || reportMissing("XR", "XR_KHR_visibility_mask"); - } - - private static boolean check_KHR_vulkan_enable(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("XR_KHR_vulkan_enable")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 55, 56, 57, 58 - }, - "xrGetVulkanInstanceExtensionsKHR", "xrGetVulkanDeviceExtensionsKHR", "xrGetVulkanGraphicsDeviceKHR", "xrGetVulkanGraphicsRequirementsKHR" - ) || reportMissing("XR", "XR_KHR_vulkan_enable"); - } - - private static boolean check_KHR_vulkan_enable2(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("XR_KHR_vulkan_enable2")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 59, 60, 61, 62 - }, - "xrCreateVulkanInstanceKHR", "xrCreateVulkanDeviceKHR", "xrGetVulkanGraphicsDevice2KHR", "xrGetVulkanGraphicsRequirements2KHR" - ) || reportMissing("XR", "XR_KHR_vulkan_enable2"); - } - - private static boolean check_KHR_win32_convert_performance_counter_time(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("XR_KHR_win32_convert_performance_counter_time")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 63, 64 - }, - "xrConvertWin32PerformanceCounterToTimeKHR", "xrConvertTimeToWin32PerformanceCounterKHR" - ) || reportMissing("XR", "XR_KHR_win32_convert_performance_counter_time"); - } - - private static boolean check_MSFT_composition_layer_reprojection(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("XR_MSFT_composition_layer_reprojection")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 65 - }, - "xrEnumerateReprojectionModesMSFT" - ) || reportMissing("XR", "XR_MSFT_composition_layer_reprojection"); - } - - private static boolean check_MSFT_controller_model(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("XR_MSFT_controller_model")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 66, 67, 68, 69 - }, - "xrGetControllerModelKeyMSFT", "xrLoadControllerModelMSFT", "xrGetControllerModelPropertiesMSFT", "xrGetControllerModelStateMSFT" - ) || reportMissing("XR", "XR_MSFT_controller_model"); - } - - private static boolean check_MSFT_hand_tracking_mesh(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("XR_MSFT_hand_tracking_mesh")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 70, 71 - }, - "xrCreateHandMeshSpaceMSFT", "xrUpdateHandMeshMSFT" - ) || reportMissing("XR", "XR_MSFT_hand_tracking_mesh"); - } - - private static boolean check_MSFT_perception_anchor_interop(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("XR_MSFT_perception_anchor_interop")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 72, 73 - }, - "xrCreateSpatialAnchorFromPerceptionAnchorMSFT", "xrTryGetPerceptionAnchorFromSpatialAnchorMSFT" - ) || reportMissing("XR", "XR_MSFT_perception_anchor_interop"); - } - - private static boolean check_MSFT_scene_understanding(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("XR_MSFT_scene_understanding")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 74, 75, 76, 77, 78, 79, 80, 81, 82, 83 - }, - "xrEnumerateSceneComputeFeaturesMSFT", "xrCreateSceneObserverMSFT", "xrDestroySceneObserverMSFT", "xrCreateSceneMSFT", "xrDestroySceneMSFT", - "xrComputeNewSceneMSFT", "xrGetSceneComputeStateMSFT", "xrGetSceneComponentsMSFT", "xrLocateSceneComponentsMSFT", "xrGetSceneMeshBuffersMSFT" - ) || reportMissing("XR", "XR_MSFT_scene_understanding"); - } - - private static boolean check_MSFT_scene_understanding_serialization(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("XR_MSFT_scene_understanding_serialization")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 84, 85 - }, - "xrDeserializeSceneMSFT", "xrGetSerializedSceneFragmentDataMSFT" - ) || reportMissing("XR", "XR_MSFT_scene_understanding_serialization"); - } - - private static boolean check_MSFT_spatial_anchor(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("XR_MSFT_spatial_anchor")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 86, 87, 88 - }, - "xrCreateSpatialAnchorMSFT", "xrCreateSpatialAnchorSpaceMSFT", "xrDestroySpatialAnchorMSFT" - ) || reportMissing("XR", "XR_MSFT_spatial_anchor"); - } - - private static boolean check_MSFT_spatial_anchor_persistence(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("XR_MSFT_spatial_anchor_persistence")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 89, 90, 91, 92, 93, 94, 95 - }, - "xrCreateSpatialAnchorStoreConnectionMSFT", "xrDestroySpatialAnchorStoreConnectionMSFT", "xrPersistSpatialAnchorMSFT", - "xrEnumeratePersistedSpatialAnchorNamesMSFT", "xrCreateSpatialAnchorFromPersistedNameMSFT", "xrUnpersistSpatialAnchorMSFT", - "xrClearSpatialAnchorStoreMSFT" - ) || reportMissing("XR", "XR_MSFT_spatial_anchor_persistence"); - } - - private static boolean check_MSFT_spatial_graph_bridge(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("XR_MSFT_spatial_graph_bridge")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 96 - }, - "xrCreateSpatialGraphNodeSpaceMSFT" - ) || reportMissing("XR", "XR_MSFT_spatial_graph_bridge"); - } - - private static boolean check_OCULUS_audio_device_guid(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("XR_OCULUS_audio_device_guid")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 97, 98 - }, - "xrGetAudioOutputDeviceGuidOculus", "xrGetAudioInputDeviceGuidOculus" - ) || reportMissing("XR", "XR_OCULUS_audio_device_guid"); - } - - private static boolean check_VARJO_environment_depth_estimation(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("XR_VARJO_environment_depth_estimation")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 99 - }, - "xrSetEnvironmentDepthEstimationVARJO" - ) || reportMissing("XR", "XR_VARJO_environment_depth_estimation"); - } - - private static boolean check_VARJO_marker_tracking(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("XR_VARJO_marker_tracking")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 100, 101, 102, 103, 104 - }, - "xrSetMarkerTrackingVARJO", "xrSetMarkerTrackingTimeoutVARJO", "xrSetMarkerTrackingPredictionVARJO", "xrGetMarkerSizeVARJO", - "xrCreateMarkerSpaceVARJO" - ) || reportMissing("XR", "XR_VARJO_marker_tracking"); - } - - private static boolean check_XR10(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("OpenXR10")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, - 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155 - }, - "xrDestroyInstance", "xrGetInstanceProperties", "xrPollEvent", "xrResultToString", "xrStructureTypeToString", "xrGetSystem", - "xrGetSystemProperties", "xrEnumerateEnvironmentBlendModes", "xrCreateSession", "xrDestroySession", "xrEnumerateReferenceSpaces", - "xrCreateReferenceSpace", "xrGetReferenceSpaceBoundsRect", "xrCreateActionSpace", "xrLocateSpace", "xrDestroySpace", - "xrEnumerateViewConfigurations", "xrGetViewConfigurationProperties", "xrEnumerateViewConfigurationViews", "xrEnumerateSwapchainFormats", - "xrCreateSwapchain", "xrDestroySwapchain", "xrEnumerateSwapchainImages", "xrAcquireSwapchainImage", "xrWaitSwapchainImage", - "xrReleaseSwapchainImage", "xrBeginSession", "xrEndSession", "xrRequestExitSession", "xrWaitFrame", "xrBeginFrame", "xrEndFrame", "xrLocateViews", - "xrStringToPath", "xrPathToString", "xrCreateActionSet", "xrDestroyActionSet", "xrCreateAction", "xrDestroyAction", - "xrSuggestInteractionProfileBindings", "xrAttachSessionActionSets", "xrGetCurrentInteractionProfile", "xrGetActionStateBoolean", - "xrGetActionStateFloat", "xrGetActionStateVector2f", "xrGetActionStatePose", "xrSyncActions", "xrEnumerateBoundSourcesForAction", - "xrGetInputSourceLocalizedName", "xrApplyHapticFeedback", "xrStopHapticFeedback" - ) || reportMissing("XR", "OpenXR10"); - } - -} diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XRHelper.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XRHelper.java deleted file mode 100644 index 890ad382..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XRHelper.java +++ /dev/null @@ -1,235 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.openxr; - -import org.lwjgl.system.MemoryStack; -import org.lwjgl.system.Platform; -import org.lwjgl.system.Struct; -import org.lwjgl.system.linux.XVisualInfo; -import org.lwjgl.system.windows.User32; - -import java.nio.ByteBuffer; -import java.nio.FloatBuffer; - -import static org.lwjgl.glfw.GLFWNativeGLX.glfwGetGLXContext; -import static org.lwjgl.glfw.GLFWNativeWGL.glfwGetWGLContext; -import static org.lwjgl.glfw.GLFWNativeWayland.glfwGetWaylandDisplay; -import static org.lwjgl.glfw.GLFWNativeWin32.glfwGetWin32Window; -import static org.lwjgl.glfw.GLFWNativeX11.glfwGetX11Display; -import static org.lwjgl.opengl.GLX13.glXGetCurrentDrawable; -import static org.lwjgl.opengl.GLX13.glXGetVisualFromFBConfig; -import static org.lwjgl.openxr.XR10.XR_TYPE_API_LAYER_PROPERTIES; -import static org.lwjgl.openxr.XR10.XR_TYPE_EXTENSION_PROPERTIES; -import static org.lwjgl.system.MemoryUtil.NULL; - -/** - * A helper class with some static methods to help applications with OpenXR related tasks that are cumbersome in - * some way. - */ -public class XRHelper { - - private static ByteBuffer mallocAndFillBufferStack(MemoryStack stack, int capacity, int sizeof, int type) { - ByteBuffer b = stack.malloc(capacity * sizeof); - - for (int i = 0; i < capacity; i++) { - b.position(i * sizeof); - b.putInt(type); - } - b.rewind(); - return b; - } - - /** - * Allocates an {@link XrApiLayerProperties.Buffer} onto the given stack with the given number of layers and - * sets the type of each element in the Buffer to XR_TYPE_API_LAYER_PROPERTIES. - * - * Note: you can't use the Buffer after the stack is gone! - * @param stack The stack to allocate the Buffer on - * @param numLayers The number of elements the Buffer should get - * @return The created Buffer - */ - public static XrApiLayerProperties.Buffer prepareApiLayerProperties(MemoryStack stack, int numLayers) { - return new XrApiLayerProperties.Buffer( - mallocAndFillBufferStack(stack, numLayers, XrApiLayerProperties.SIZEOF, XR_TYPE_API_LAYER_PROPERTIES) - ); - } - - /** - * Allocates an {@link XrExtensionProperties.Buffer} onto the given stack with the given number of extensions - * and sets the type of each element in the Buffer to XR_TYPE_EXTENSION_PROPERTIES. - * - * Note: you can't use the Buffer after the stack is gone! - * @param stack The stack onto which to allocate the Buffer - * @param numExtensions The number of elements the Buffer should get - * @return The created Buffer - */ - public static XrExtensionProperties.Buffer prepareExtensionProperties(MemoryStack stack, int numExtensions) { - return new XrExtensionProperties.Buffer( - mallocAndFillBufferStack(stack, numExtensions, XrExtensionProperties.SIZEOF, XR_TYPE_EXTENSION_PROPERTIES) - ); - } - - /** - * Allocates a {@link FloatBuffer} onto the given stack and fills it such that it can be used as parameter - * to the set method of Matrix4f. The buffer will be filled such that it represents a projection - * matrix with the given fov, nearZ (a.k.a. near plane), farZ (a.k.a. far plane). - * @param stack The stack onto which the buffer should be allocated - * @param fov The desired Field of View for the projection matrix. You should normally use the value of - * {@link XrCompositionLayerProjectionView#fov}. - * @param nearZ The nearest Z value that the user should see (also known as the near plane) - * @param farZ The furthest Z value that the user should see (also known as far plane) - * @param zZeroToOne True if the z-axis of the coordinate system goes from 0 to 1 (Vulkan). - * False if the z-axis of the coordinate system goes from -1 to 1 (OpenGL). - * @return A {@link FloatBuffer} that contains the matrix data of the desired projection matrix. Use the - * set method of a Matrix4f instance to copy the buffer values to that matrix. - */ - public static FloatBuffer createProjectionMatrixBuffer( - MemoryStack stack, XrFovf fov, float nearZ, float farZ, boolean zZeroToOne - ) { - float tanLeft = (float)Math.tan(fov.angleLeft()); - float tanRight = (float)Math.tan(fov.angleRight()); - float tanDown = (float)Math.tan(fov.angleDown()); - float tanUp = (float)Math.tan(fov.angleUp()); - float tanAngleWidth = tanRight - tanLeft; - float tanAngleHeight; - if (zZeroToOne) { - tanAngleHeight = tanDown - tanUp; - } else { - tanAngleHeight = tanUp - tanDown; - } - - FloatBuffer m = stack.mallocFloat(16); - m.put(0, 2.0f / tanAngleWidth); - m.put(4, 0.0f); - m.put(8, (tanRight + tanLeft) / tanAngleWidth); - m.put(12, 0.0f); - - m.put(1, 0.0f); - m.put(5, 2.0f / tanAngleHeight); - m.put(9, (tanUp + tanDown) / tanAngleHeight); - m.put(13, 0.0f); - - m.put(2, 0.0f); - m.put(6, 0.0f); - if (zZeroToOne) { - m.put(10, -farZ / (farZ - nearZ)); - m.put(14, -(farZ * nearZ) / (farZ - nearZ)); - } else { - m.put(10, -(farZ + nearZ) / (farZ - nearZ)); - m.put(14, -(farZ * (nearZ + nearZ)) / (farZ - nearZ)); - } - - m.put(3, 0.0f); - m.put(7, 0.0f); - m.put(11, -1.0f); - m.put(15, 0.0f); - - return m; - } - - /** - *

- * Allocates a XrGraphicsBindingOpenGL** struct for the current platform onto the given stack. It should - * be included in the next-chain of the {@link XrSessionCreateInfo} that will be used to create an - * OpenXR session with OpenGL rendering. (Every platform requires a different OpenGL graphics binding - * struct, so this method spares users the trouble of working with all these cases themselves.) - *

- * - *

- * Note: {@link XR10#xrCreateSession} must be called before the given stack is dropped! - *

- * - *

- * Note: Linux support is not finished, so only Windows works at the moment. This should be fixed in the - * future. Until then, Vulkan is the only cross-platform rendering API for the OpenXR Java bindings. - *

- * @param stack The stack onto which to allocate the graphics binding struct - * @param window The GLFW window handle used to create the OpenGL context - * @return A XrGraphicsBindingOpenGL** struct that can be used to create a session - * @throws IllegalStateException If the current platform is not supported - */ - public static Struct createGraphicsBindingOpenGL(MemoryStack stack, long window) throws IllegalStateException { - switch (Platform.get()) { - case LINUX: - - // Test which windowing system is used - boolean supportsWayland = false; - boolean supportsX11 = false; - try { - glfwGetWaylandDisplay(); - supportsWayland = true; - } catch (ExceptionInInitializerError noWayland) { - // I don't know a better way to test this - } - try { - glfwGetX11Display(); - supportsX11 = true; - } catch (ExceptionInInitializerError noX11) { - // I don't know a better way to test this - } - - /* - * NOTE: X11 is preferred over Wayland because Monado, the most promising Linux OpenXR runtime, - * doesn't handle XrGraphicsBindingOpenGLWaylandKHR at the moment. See - * https://gitlab.freedesktop.org/monado/monado/-/issues/128 for the current status on this. - */ - if (supportsX11) { - XrGraphicsBindingOpenGLXlibKHR graphicsBinding = XrGraphicsBindingOpenGLXlibKHR.malloc(stack); - long display = glfwGetX11Display(); - - /* - * To continue, we need the GLXFBConfig that was used to create the GLFW window. Unfortunately, - * GLFW doesn't expose this to us. I created a pull request for this: - * https://github.com/glfw/glfw/pull/1925 - * Linux X11 support will be blocked until it is merged. When it is merged, the GLFW bindings of - * GLFW will need to be updated as well. - */ - long glxConfig = -1; - // long glxConfig = glfwGetGLXFBConfig(); - - if (glxConfig == -1) { - throw new IllegalStateException("Linux X11 support is not finished"); - } - - XVisualInfo visualInfo = glXGetVisualFromFBConfig(display, glxConfig); - if (visualInfo == null) { - throw new IllegalStateException("Failed to get visual info"); - } - long visualid = visualInfo.visualid(); - graphicsBinding.set( - KHROpenglEnable.XR_TYPE_GRAPHICS_BINDING_OPENGL_XLIB_KHR, - NULL, - display, - (int) visualid, - glxConfig, - glXGetCurrentDrawable(), - glfwGetGLXContext(window) - ); - return graphicsBinding; - } else if (supportsWayland) { - XrGraphicsBindingOpenGLWaylandKHR graphicsBinding = XrGraphicsBindingOpenGLWaylandKHR.malloc(stack); - graphicsBinding.set( - KHROpenglEnable.XR_TYPE_GRAPHICS_BINDING_OPENGL_WAYLAND_KHR, - NULL, - glfwGetWaylandDisplay() - ); - return graphicsBinding; - } else { - throw new IllegalStateException("Unsupported Linux windowing system. Only X11 and Wayland are supported"); - } - case WINDOWS: - XrGraphicsBindingOpenGLWin32KHR winGraphicsBinding = XrGraphicsBindingOpenGLWin32KHR.malloc(stack); - winGraphicsBinding.set( - KHROpenglEnable.XR_TYPE_GRAPHICS_BINDING_OPENGL_WIN32_KHR, - NULL, - User32.GetDC(glfwGetWin32Window(window)), - glfwGetWGLContext(window) - ); - return winGraphicsBinding; - default: - throw new IllegalStateException("Unsupported operation system: " + Platform.get()); - } - } -} diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrAction.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrAction.java deleted file mode 100644 index 2c1a3618..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrAction.java +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.openxr; - -public class XrAction extends DispatchableHandle { - public XrAction(long handle, DispatchableHandle session) { - super(handle, session.getCapabilities()); - } - - public XrAction(long handle, XRCapabilities capabilities) { - super(handle, capabilities); - } -} diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrActionCreateInfo.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrActionCreateInfo.java deleted file mode 100644 index fb98af37..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrActionCreateInfo.java +++ /dev/null @@ -1,413 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; -import java.nio.LongBuffer; - -import static org.lwjgl.openxr.XR10.XR_MAX_ACTION_NAME_SIZE; -import static org.lwjgl.openxr.XR10.XR_MAX_LOCALIZED_ACTION_NAME_SIZE; -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrActionCreateInfo {
- *     XrStructureType type;
- *     void const * next;
- *     char actionName[XR_MAX_ACTION_NAME_SIZE];
- *     XrActionType actionType;
- *     uint32_t countSubactionPaths;
- *     XrPath const * subactionPaths;
- *     char localizedActionName[XR_MAX_LOCALIZED_ACTION_NAME_SIZE];
- * }
- */ -public class XrActionCreateInfo extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - ACTIONNAME, - ACTIONTYPE, - COUNTSUBACTIONPATHS, - SUBACTIONPATHS, - LOCALIZEDACTIONNAME; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __array(1, XR_MAX_ACTION_NAME_SIZE), - __member(4), - __member(4), - __member(POINTER_SIZE), - __array(1, XR_MAX_LOCALIZED_ACTION_NAME_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - ACTIONNAME = layout.offsetof(2); - ACTIONTYPE = layout.offsetof(3); - COUNTSUBACTIONPATHS = layout.offsetof(4); - SUBACTIONPATHS = layout.offsetof(5); - LOCALIZEDACTIONNAME = layout.offsetof(6); - } - - /** - * Creates a {@code XrActionCreateInfo} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrActionCreateInfo(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return a {@link ByteBuffer} view of the {@code actionName} field. */ - @NativeType("char[XR_MAX_ACTION_NAME_SIZE]") - public ByteBuffer actionName() { return nactionName(address()); } - /** @return the null-terminated string stored in the {@code actionName} field. */ - @NativeType("char[XR_MAX_ACTION_NAME_SIZE]") - public String actionNameString() { return nactionNameString(address()); } - /** @return the value of the {@code actionType} field. */ - @NativeType("XrActionType") - public int actionType() { return nactionType(address()); } - /** @return the value of the {@code countSubactionPaths} field. */ - @NativeType("uint32_t") - public int countSubactionPaths() { return ncountSubactionPaths(address()); } - /** @return a {@link LongBuffer} view of the data pointed to by the {@code subactionPaths} field. */ - @Nullable - @NativeType("XrPath const *") - public LongBuffer subactionPaths() { return nsubactionPaths(address()); } - /** @return a {@link ByteBuffer} view of the {@code localizedActionName} field. */ - @NativeType("char[XR_MAX_LOCALIZED_ACTION_NAME_SIZE]") - public ByteBuffer localizedActionName() { return nlocalizedActionName(address()); } - /** @return the null-terminated string stored in the {@code localizedActionName} field. */ - @NativeType("char[XR_MAX_LOCALIZED_ACTION_NAME_SIZE]") - public String localizedActionNameString() { return nlocalizedActionNameString(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrActionCreateInfo type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_ACTION_CREATE_INFO TYPE_ACTION_CREATE_INFO} value to the {@code type} field. */ - public XrActionCreateInfo type$Default() { return type(XR10.XR_TYPE_ACTION_CREATE_INFO); } - /** Sets the specified value to the {@code next} field. */ - public XrActionCreateInfo next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Copies the specified encoded string to the {@code actionName} field. */ - public XrActionCreateInfo actionName(@NativeType("char[XR_MAX_ACTION_NAME_SIZE]") ByteBuffer value) { nactionName(address(), value); return this; } - /** Sets the specified value to the {@code actionType} field. */ - public XrActionCreateInfo actionType(@NativeType("XrActionType") int value) { nactionType(address(), value); return this; } - /** Sets the specified value to the {@code countSubactionPaths} field. */ - public XrActionCreateInfo countSubactionPaths(@NativeType("uint32_t") int value) { ncountSubactionPaths(address(), value); return this; } - /** Sets the address of the specified {@link LongBuffer} to the {@code subactionPaths} field. */ - public XrActionCreateInfo subactionPaths(@Nullable @NativeType("XrPath const *") LongBuffer value) { nsubactionPaths(address(), value); return this; } - /** Copies the specified encoded string to the {@code localizedActionName} field. */ - public XrActionCreateInfo localizedActionName(@NativeType("char[XR_MAX_LOCALIZED_ACTION_NAME_SIZE]") ByteBuffer value) { nlocalizedActionName(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrActionCreateInfo set( - int type, - long next, - ByteBuffer actionName, - int actionType, - int countSubactionPaths, - @Nullable LongBuffer subactionPaths, - ByteBuffer localizedActionName - ) { - type(type); - next(next); - actionName(actionName); - actionType(actionType); - countSubactionPaths(countSubactionPaths); - subactionPaths(subactionPaths); - localizedActionName(localizedActionName); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrActionCreateInfo set(XrActionCreateInfo src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrActionCreateInfo} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrActionCreateInfo malloc() { - return wrap(XrActionCreateInfo.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrActionCreateInfo} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrActionCreateInfo calloc() { - return wrap(XrActionCreateInfo.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrActionCreateInfo} instance allocated with {@link BufferUtils}. */ - public static XrActionCreateInfo create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrActionCreateInfo.class, memAddress(container), container); - } - - /** Returns a new {@code XrActionCreateInfo} instance for the specified memory address. */ - public static XrActionCreateInfo create(long address) { - return wrap(XrActionCreateInfo.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrActionCreateInfo createSafe(long address) { - return address == NULL ? null : wrap(XrActionCreateInfo.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrActionCreateInfo.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrActionCreateInfo} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrActionCreateInfo malloc(MemoryStack stack) { - return wrap(XrActionCreateInfo.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrActionCreateInfo} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrActionCreateInfo calloc(MemoryStack stack) { - return wrap(XrActionCreateInfo.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrActionCreateInfo.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrActionCreateInfo.NEXT); } - /** Unsafe version of {@link #actionName}. */ - public static ByteBuffer nactionName(long struct) { return memByteBuffer(struct + XrActionCreateInfo.ACTIONNAME, XR_MAX_ACTION_NAME_SIZE); } - /** Unsafe version of {@link #actionNameString}. */ - public static String nactionNameString(long struct) { return memUTF8(struct + XrActionCreateInfo.ACTIONNAME); } - /** Unsafe version of {@link #actionType}. */ - public static int nactionType(long struct) { return UNSAFE.getInt(null, struct + XrActionCreateInfo.ACTIONTYPE); } - /** Unsafe version of {@link #countSubactionPaths}. */ - public static int ncountSubactionPaths(long struct) { return UNSAFE.getInt(null, struct + XrActionCreateInfo.COUNTSUBACTIONPATHS); } - /** Unsafe version of {@link #subactionPaths() subactionPaths}. */ - @Nullable public static LongBuffer nsubactionPaths(long struct) { return memLongBufferSafe(memGetAddress(struct + XrActionCreateInfo.SUBACTIONPATHS), ncountSubactionPaths(struct)); } - /** Unsafe version of {@link #localizedActionName}. */ - public static ByteBuffer nlocalizedActionName(long struct) { return memByteBuffer(struct + XrActionCreateInfo.LOCALIZEDACTIONNAME, XR_MAX_LOCALIZED_ACTION_NAME_SIZE); } - /** Unsafe version of {@link #localizedActionNameString}. */ - public static String nlocalizedActionNameString(long struct) { return memUTF8(struct + XrActionCreateInfo.LOCALIZEDACTIONNAME); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrActionCreateInfo.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrActionCreateInfo.NEXT, value); } - /** Unsafe version of {@link #actionName(ByteBuffer) actionName}. */ - public static void nactionName(long struct, ByteBuffer value) { - if (CHECKS) { - checkNT1(value); - checkGT(value, XR_MAX_ACTION_NAME_SIZE); - } - memCopy(memAddress(value), struct + XrActionCreateInfo.ACTIONNAME, value.remaining()); - } - /** Unsafe version of {@link #actionType(int) actionType}. */ - public static void nactionType(long struct, int value) { UNSAFE.putInt(null, struct + XrActionCreateInfo.ACTIONTYPE, value); } - /** Sets the specified value to the {@code countSubactionPaths} field of the specified {@code struct}. */ - public static void ncountSubactionPaths(long struct, int value) { UNSAFE.putInt(null, struct + XrActionCreateInfo.COUNTSUBACTIONPATHS, value); } - /** Unsafe version of {@link #subactionPaths(LongBuffer) subactionPaths}. */ - public static void nsubactionPaths(long struct, @Nullable LongBuffer value) { memPutAddress(struct + XrActionCreateInfo.SUBACTIONPATHS, memAddressSafe(value)); if (value != null) { ncountSubactionPaths(struct, value.remaining()); } } - /** Unsafe version of {@link #localizedActionName(ByteBuffer) localizedActionName}. */ - public static void nlocalizedActionName(long struct, ByteBuffer value) { - if (CHECKS) { - checkNT1(value); - checkGT(value, XR_MAX_LOCALIZED_ACTION_NAME_SIZE); - } - memCopy(memAddress(value), struct + XrActionCreateInfo.LOCALIZEDACTIONNAME, value.remaining()); - } - - // ----------------------------------- - - /** An array of {@link XrActionCreateInfo} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrActionCreateInfo ELEMENT_FACTORY = XrActionCreateInfo.create(-1L); - - /** - * Creates a new {@code XrActionCreateInfo.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrActionCreateInfo#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrActionCreateInfo getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrActionCreateInfo.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrActionCreateInfo.nnext(address()); } - /** @return a {@link ByteBuffer} view of the {@code actionName} field. */ - @NativeType("char[XR_MAX_ACTION_NAME_SIZE]") - public ByteBuffer actionName() { return XrActionCreateInfo.nactionName(address()); } - /** @return the null-terminated string stored in the {@code actionName} field. */ - @NativeType("char[XR_MAX_ACTION_NAME_SIZE]") - public String actionNameString() { return XrActionCreateInfo.nactionNameString(address()); } - /** @return the value of the {@code actionType} field. */ - @NativeType("XrActionType") - public int actionType() { return XrActionCreateInfo.nactionType(address()); } - /** @return the value of the {@code countSubactionPaths} field. */ - @NativeType("uint32_t") - public int countSubactionPaths() { return XrActionCreateInfo.ncountSubactionPaths(address()); } - /** @return a {@link LongBuffer} view of the data pointed to by the {@code subactionPaths} field. */ - @Nullable - @NativeType("XrPath const *") - public LongBuffer subactionPaths() { return XrActionCreateInfo.nsubactionPaths(address()); } - /** @return a {@link ByteBuffer} view of the {@code localizedActionName} field. */ - @NativeType("char[XR_MAX_LOCALIZED_ACTION_NAME_SIZE]") - public ByteBuffer localizedActionName() { return XrActionCreateInfo.nlocalizedActionName(address()); } - /** @return the null-terminated string stored in the {@code localizedActionName} field. */ - @NativeType("char[XR_MAX_LOCALIZED_ACTION_NAME_SIZE]") - public String localizedActionNameString() { return XrActionCreateInfo.nlocalizedActionNameString(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrActionCreateInfo.ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_ACTION_CREATE_INFO TYPE_ACTION_CREATE_INFO} value to the {@code type} field. */ - public Buffer type$Default() { return type(XR10.XR_TYPE_ACTION_CREATE_INFO); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrActionCreateInfo.nnext(address(), value); return this; } - /** Copies the specified encoded string to the {@code actionName} field. */ - public Buffer actionName(@NativeType("char[XR_MAX_ACTION_NAME_SIZE]") ByteBuffer value) { XrActionCreateInfo.nactionName(address(), value); return this; } - /** Sets the specified value to the {@code actionType} field. */ - public Buffer actionType(@NativeType("XrActionType") int value) { XrActionCreateInfo.nactionType(address(), value); return this; } - /** Sets the specified value to the {@code countSubactionPaths} field. */ - public Buffer countSubactionPaths(@NativeType("uint32_t") int value) { XrActionCreateInfo.ncountSubactionPaths(address(), value); return this; } - /** Sets the address of the specified {@link LongBuffer} to the {@code subactionPaths} field. */ - public Buffer subactionPaths(@Nullable @NativeType("XrPath const *") LongBuffer value) { XrActionCreateInfo.nsubactionPaths(address(), value); return this; } - /** Copies the specified encoded string to the {@code localizedActionName} field. */ - public Buffer localizedActionName(@NativeType("char[XR_MAX_LOCALIZED_ACTION_NAME_SIZE]") ByteBuffer value) { XrActionCreateInfo.nlocalizedActionName(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrActionSet.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrActionSet.java deleted file mode 100644 index 34d245a9..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrActionSet.java +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.openxr; - -public class XrActionSet extends DispatchableHandle { - public XrActionSet(long handle, DispatchableHandle session) { - super(handle, session.getCapabilities()); - } - - public XrActionSet(long handle, XRCapabilities capabilities) { - super(handle, capabilities); - } -} diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrActionSetCreateInfo.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrActionSetCreateInfo.java deleted file mode 100644 index c45e45ec..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrActionSetCreateInfo.java +++ /dev/null @@ -1,370 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.openxr.XR10.XR_MAX_ACTION_SET_NAME_SIZE; -import static org.lwjgl.openxr.XR10.XR_MAX_LOCALIZED_ACTION_SET_NAME_SIZE; -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrActionSetCreateInfo {
- *     XrStructureType type;
- *     void const * next;
- *     char actionSetName[XR_MAX_ACTION_SET_NAME_SIZE];
- *     char localizedActionSetName[XR_MAX_LOCALIZED_ACTION_SET_NAME_SIZE];
- *     uint32_t priority;
- * }
- */ -public class XrActionSetCreateInfo extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - ACTIONSETNAME, - LOCALIZEDACTIONSETNAME, - PRIORITY; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __array(1, XR_MAX_ACTION_SET_NAME_SIZE), - __array(1, XR_MAX_LOCALIZED_ACTION_SET_NAME_SIZE), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - ACTIONSETNAME = layout.offsetof(2); - LOCALIZEDACTIONSETNAME = layout.offsetof(3); - PRIORITY = layout.offsetof(4); - } - - /** - * Creates a {@code XrActionSetCreateInfo} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrActionSetCreateInfo(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return a {@link ByteBuffer} view of the {@code actionSetName} field. */ - @NativeType("char[XR_MAX_ACTION_SET_NAME_SIZE]") - public ByteBuffer actionSetName() { return nactionSetName(address()); } - /** @return the null-terminated string stored in the {@code actionSetName} field. */ - @NativeType("char[XR_MAX_ACTION_SET_NAME_SIZE]") - public String actionSetNameString() { return nactionSetNameString(address()); } - /** @return a {@link ByteBuffer} view of the {@code localizedActionSetName} field. */ - @NativeType("char[XR_MAX_LOCALIZED_ACTION_SET_NAME_SIZE]") - public ByteBuffer localizedActionSetName() { return nlocalizedActionSetName(address()); } - /** @return the null-terminated string stored in the {@code localizedActionSetName} field. */ - @NativeType("char[XR_MAX_LOCALIZED_ACTION_SET_NAME_SIZE]") - public String localizedActionSetNameString() { return nlocalizedActionSetNameString(address()); } - /** @return the value of the {@code priority} field. */ - @NativeType("uint32_t") - public int priority() { return npriority(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrActionSetCreateInfo type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_ACTION_SET_CREATE_INFO TYPE_ACTION_SET_CREATE_INFO} value to the {@code type} field. */ - public XrActionSetCreateInfo type$Default() { return type(XR10.XR_TYPE_ACTION_SET_CREATE_INFO); } - /** Sets the specified value to the {@code next} field. */ - public XrActionSetCreateInfo next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Copies the specified encoded string to the {@code actionSetName} field. */ - public XrActionSetCreateInfo actionSetName(@NativeType("char[XR_MAX_ACTION_SET_NAME_SIZE]") ByteBuffer value) { nactionSetName(address(), value); return this; } - /** Copies the specified encoded string to the {@code localizedActionSetName} field. */ - public XrActionSetCreateInfo localizedActionSetName(@NativeType("char[XR_MAX_LOCALIZED_ACTION_SET_NAME_SIZE]") ByteBuffer value) { nlocalizedActionSetName(address(), value); return this; } - /** Sets the specified value to the {@code priority} field. */ - public XrActionSetCreateInfo priority(@NativeType("uint32_t") int value) { npriority(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrActionSetCreateInfo set( - int type, - long next, - ByteBuffer actionSetName, - ByteBuffer localizedActionSetName, - int priority - ) { - type(type); - next(next); - actionSetName(actionSetName); - localizedActionSetName(localizedActionSetName); - priority(priority); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrActionSetCreateInfo set(XrActionSetCreateInfo src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrActionSetCreateInfo} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrActionSetCreateInfo malloc() { - return wrap(XrActionSetCreateInfo.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrActionSetCreateInfo} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrActionSetCreateInfo calloc() { - return wrap(XrActionSetCreateInfo.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrActionSetCreateInfo} instance allocated with {@link BufferUtils}. */ - public static XrActionSetCreateInfo create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrActionSetCreateInfo.class, memAddress(container), container); - } - - /** Returns a new {@code XrActionSetCreateInfo} instance for the specified memory address. */ - public static XrActionSetCreateInfo create(long address) { - return wrap(XrActionSetCreateInfo.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrActionSetCreateInfo createSafe(long address) { - return address == NULL ? null : wrap(XrActionSetCreateInfo.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrActionSetCreateInfo.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrActionSetCreateInfo} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrActionSetCreateInfo malloc(MemoryStack stack) { - return wrap(XrActionSetCreateInfo.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrActionSetCreateInfo} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrActionSetCreateInfo calloc(MemoryStack stack) { - return wrap(XrActionSetCreateInfo.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrActionSetCreateInfo.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrActionSetCreateInfo.NEXT); } - /** Unsafe version of {@link #actionSetName}. */ - public static ByteBuffer nactionSetName(long struct) { return memByteBuffer(struct + XrActionSetCreateInfo.ACTIONSETNAME, XR_MAX_ACTION_SET_NAME_SIZE); } - /** Unsafe version of {@link #actionSetNameString}. */ - public static String nactionSetNameString(long struct) { return memUTF8(struct + XrActionSetCreateInfo.ACTIONSETNAME); } - /** Unsafe version of {@link #localizedActionSetName}. */ - public static ByteBuffer nlocalizedActionSetName(long struct) { return memByteBuffer(struct + XrActionSetCreateInfo.LOCALIZEDACTIONSETNAME, XR_MAX_LOCALIZED_ACTION_SET_NAME_SIZE); } - /** Unsafe version of {@link #localizedActionSetNameString}. */ - public static String nlocalizedActionSetNameString(long struct) { return memUTF8(struct + XrActionSetCreateInfo.LOCALIZEDACTIONSETNAME); } - /** Unsafe version of {@link #priority}. */ - public static int npriority(long struct) { return UNSAFE.getInt(null, struct + XrActionSetCreateInfo.PRIORITY); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrActionSetCreateInfo.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrActionSetCreateInfo.NEXT, value); } - /** Unsafe version of {@link #actionSetName(ByteBuffer) actionSetName}. */ - public static void nactionSetName(long struct, ByteBuffer value) { - if (CHECKS) { - checkNT1(value); - checkGT(value, XR_MAX_ACTION_SET_NAME_SIZE); - } - memCopy(memAddress(value), struct + XrActionSetCreateInfo.ACTIONSETNAME, value.remaining()); - } - /** Unsafe version of {@link #localizedActionSetName(ByteBuffer) localizedActionSetName}. */ - public static void nlocalizedActionSetName(long struct, ByteBuffer value) { - if (CHECKS) { - checkNT1(value); - checkGT(value, XR_MAX_LOCALIZED_ACTION_SET_NAME_SIZE); - } - memCopy(memAddress(value), struct + XrActionSetCreateInfo.LOCALIZEDACTIONSETNAME, value.remaining()); - } - /** Unsafe version of {@link #priority(int) priority}. */ - public static void npriority(long struct, int value) { UNSAFE.putInt(null, struct + XrActionSetCreateInfo.PRIORITY, value); } - - // ----------------------------------- - - /** An array of {@link XrActionSetCreateInfo} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrActionSetCreateInfo ELEMENT_FACTORY = XrActionSetCreateInfo.create(-1L); - - /** - * Creates a new {@code XrActionSetCreateInfo.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrActionSetCreateInfo#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrActionSetCreateInfo getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrActionSetCreateInfo.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrActionSetCreateInfo.nnext(address()); } - /** @return a {@link ByteBuffer} view of the {@code actionSetName} field. */ - @NativeType("char[XR_MAX_ACTION_SET_NAME_SIZE]") - public ByteBuffer actionSetName() { return XrActionSetCreateInfo.nactionSetName(address()); } - /** @return the null-terminated string stored in the {@code actionSetName} field. */ - @NativeType("char[XR_MAX_ACTION_SET_NAME_SIZE]") - public String actionSetNameString() { return XrActionSetCreateInfo.nactionSetNameString(address()); } - /** @return a {@link ByteBuffer} view of the {@code localizedActionSetName} field. */ - @NativeType("char[XR_MAX_LOCALIZED_ACTION_SET_NAME_SIZE]") - public ByteBuffer localizedActionSetName() { return XrActionSetCreateInfo.nlocalizedActionSetName(address()); } - /** @return the null-terminated string stored in the {@code localizedActionSetName} field. */ - @NativeType("char[XR_MAX_LOCALIZED_ACTION_SET_NAME_SIZE]") - public String localizedActionSetNameString() { return XrActionSetCreateInfo.nlocalizedActionSetNameString(address()); } - /** @return the value of the {@code priority} field. */ - @NativeType("uint32_t") - public int priority() { return XrActionSetCreateInfo.npriority(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrActionSetCreateInfo.ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_ACTION_SET_CREATE_INFO TYPE_ACTION_SET_CREATE_INFO} value to the {@code type} field. */ - public Buffer type$Default() { return type(XR10.XR_TYPE_ACTION_SET_CREATE_INFO); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrActionSetCreateInfo.nnext(address(), value); return this; } - /** Copies the specified encoded string to the {@code actionSetName} field. */ - public Buffer actionSetName(@NativeType("char[XR_MAX_ACTION_SET_NAME_SIZE]") ByteBuffer value) { XrActionSetCreateInfo.nactionSetName(address(), value); return this; } - /** Copies the specified encoded string to the {@code localizedActionSetName} field. */ - public Buffer localizedActionSetName(@NativeType("char[XR_MAX_LOCALIZED_ACTION_SET_NAME_SIZE]") ByteBuffer value) { XrActionSetCreateInfo.nlocalizedActionSetName(address(), value); return this; } - /** Sets the specified value to the {@code priority} field. */ - public Buffer priority(@NativeType("uint32_t") int value) { XrActionSetCreateInfo.npriority(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrActionSpaceCreateInfo.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrActionSpaceCreateInfo.java deleted file mode 100644 index f36c0ea2..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrActionSpaceCreateInfo.java +++ /dev/null @@ -1,363 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrActionSpaceCreateInfo {
- *     XrStructureType type;
- *     void const * next;
- *     XrAction action;
- *     XrPath subactionPath;
- *     {@link XrPosef XrPosef} poseInActionSpace;
- * }
- */ -public class XrActionSpaceCreateInfo extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - ACTION, - SUBACTIONPATH, - POSEINACTIONSPACE; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(8), - __member(XrPosef.SIZEOF, XrPosef.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - ACTION = layout.offsetof(2); - SUBACTIONPATH = layout.offsetof(3); - POSEINACTIONSPACE = layout.offsetof(4); - } - - /** - * Creates a {@code XrActionSpaceCreateInfo} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrActionSpaceCreateInfo(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code action} field. */ - @NativeType("XrAction") - public long action() { return naction(address()); } - /** @return the value of the {@code subactionPath} field. */ - @NativeType("XrPath") - public long subactionPath() { return nsubactionPath(address()); } - /** @return a {@link XrPosef} view of the {@code poseInActionSpace} field. */ - public XrPosef poseInActionSpace() { return nposeInActionSpace(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrActionSpaceCreateInfo type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_ACTION_SPACE_CREATE_INFO TYPE_ACTION_SPACE_CREATE_INFO} value to the {@code type} field. */ - public XrActionSpaceCreateInfo type$Default() { return type(XR10.XR_TYPE_ACTION_SPACE_CREATE_INFO); } - /** Sets the specified value to the {@code next} field. */ - public XrActionSpaceCreateInfo next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code action} field. */ - public XrActionSpaceCreateInfo action(XrAction value) { naction(address(), value); return this; } - /** Sets the specified value to the {@code subactionPath} field. */ - public XrActionSpaceCreateInfo subactionPath(@NativeType("XrPath") long value) { nsubactionPath(address(), value); return this; } - /** Copies the specified {@link XrPosef} to the {@code poseInActionSpace} field. */ - public XrActionSpaceCreateInfo poseInActionSpace(XrPosef value) { nposeInActionSpace(address(), value); return this; } - /** Passes the {@code poseInActionSpace} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrActionSpaceCreateInfo poseInActionSpace(java.util.function.Consumer consumer) { consumer.accept(poseInActionSpace()); return this; } - - /** Initializes this struct with the specified values. */ - public XrActionSpaceCreateInfo set( - int type, - long next, - XrAction action, - long subactionPath, - XrPosef poseInActionSpace - ) { - type(type); - next(next); - action(action); - subactionPath(subactionPath); - poseInActionSpace(poseInActionSpace); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrActionSpaceCreateInfo set(XrActionSpaceCreateInfo src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrActionSpaceCreateInfo} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrActionSpaceCreateInfo malloc() { - return wrap(XrActionSpaceCreateInfo.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrActionSpaceCreateInfo} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrActionSpaceCreateInfo calloc() { - return wrap(XrActionSpaceCreateInfo.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrActionSpaceCreateInfo} instance allocated with {@link BufferUtils}. */ - public static XrActionSpaceCreateInfo create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrActionSpaceCreateInfo.class, memAddress(container), container); - } - - /** Returns a new {@code XrActionSpaceCreateInfo} instance for the specified memory address. */ - public static XrActionSpaceCreateInfo create(long address) { - return wrap(XrActionSpaceCreateInfo.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrActionSpaceCreateInfo createSafe(long address) { - return address == NULL ? null : wrap(XrActionSpaceCreateInfo.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrActionSpaceCreateInfo.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrActionSpaceCreateInfo} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrActionSpaceCreateInfo malloc(MemoryStack stack) { - return wrap(XrActionSpaceCreateInfo.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrActionSpaceCreateInfo} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrActionSpaceCreateInfo calloc(MemoryStack stack) { - return wrap(XrActionSpaceCreateInfo.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrActionSpaceCreateInfo.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrActionSpaceCreateInfo.NEXT); } - /** Unsafe version of {@link #action}. */ - public static long naction(long struct) { return memGetAddress(struct + XrActionSpaceCreateInfo.ACTION); } - /** Unsafe version of {@link #subactionPath}. */ - public static long nsubactionPath(long struct) { return UNSAFE.getLong(null, struct + XrActionSpaceCreateInfo.SUBACTIONPATH); } - /** Unsafe version of {@link #poseInActionSpace}. */ - public static XrPosef nposeInActionSpace(long struct) { return XrPosef.create(struct + XrActionSpaceCreateInfo.POSEINACTIONSPACE); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrActionSpaceCreateInfo.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrActionSpaceCreateInfo.NEXT, value); } - /** Unsafe version of {@link #action(XrAction) action}. */ - public static void naction(long struct, XrAction value) { memPutAddress(struct + XrActionSpaceCreateInfo.ACTION, value.address()); } - /** Unsafe version of {@link #subactionPath(long) subactionPath}. */ - public static void nsubactionPath(long struct, long value) { UNSAFE.putLong(null, struct + XrActionSpaceCreateInfo.SUBACTIONPATH, value); } - /** Unsafe version of {@link #poseInActionSpace(XrPosef) poseInActionSpace}. */ - public static void nposeInActionSpace(long struct, XrPosef value) { memCopy(value.address(), struct + XrActionSpaceCreateInfo.POSEINACTIONSPACE, XrPosef.SIZEOF); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XrActionSpaceCreateInfo.ACTION)); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrActionSpaceCreateInfo} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrActionSpaceCreateInfo ELEMENT_FACTORY = XrActionSpaceCreateInfo.create(-1L); - - /** - * Creates a new {@code XrActionSpaceCreateInfo.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrActionSpaceCreateInfo#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrActionSpaceCreateInfo getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrActionSpaceCreateInfo.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrActionSpaceCreateInfo.nnext(address()); } - /** @return the value of the {@code action} field. */ - @NativeType("XrAction") - public long action() { return XrActionSpaceCreateInfo.naction(address()); } - /** @return the value of the {@code subactionPath} field. */ - @NativeType("XrPath") - public long subactionPath() { return XrActionSpaceCreateInfo.nsubactionPath(address()); } - /** @return a {@link XrPosef} view of the {@code poseInActionSpace} field. */ - public XrPosef poseInActionSpace() { return XrActionSpaceCreateInfo.nposeInActionSpace(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrActionSpaceCreateInfo.ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_ACTION_SPACE_CREATE_INFO TYPE_ACTION_SPACE_CREATE_INFO} value to the {@code type} field. */ - public Buffer type$Default() { return type(XR10.XR_TYPE_ACTION_SPACE_CREATE_INFO); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrActionSpaceCreateInfo.nnext(address(), value); return this; } - /** Sets the specified value to the {@code action} field. */ - public Buffer action(XrAction value) { XrActionSpaceCreateInfo.naction(address(), value); return this; } - /** Sets the specified value to the {@code subactionPath} field. */ - public Buffer subactionPath(@NativeType("XrPath") long value) { XrActionSpaceCreateInfo.nsubactionPath(address(), value); return this; } - /** Copies the specified {@link XrPosef} to the {@code poseInActionSpace} field. */ - public Buffer poseInActionSpace(XrPosef value) { XrActionSpaceCreateInfo.nposeInActionSpace(address(), value); return this; } - /** Passes the {@code poseInActionSpace} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer poseInActionSpace(java.util.function.Consumer consumer) { consumer.accept(poseInActionSpace()); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrActionStateBoolean.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrActionStateBoolean.java deleted file mode 100644 index 4e461f95..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrActionStateBoolean.java +++ /dev/null @@ -1,360 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; - -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrActionStateBoolean {
- *     XrStructureType type;
- *     void * next;
- *     XrBool32 currentState;
- *     XrBool32 changedSinceLastSync;
- *     XrTime lastChangeTime;
- *     XrBool32 isActive;
- * }
- */ -public class XrActionStateBoolean extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - CURRENTSTATE, - CHANGEDSINCELASTSYNC, - LASTCHANGETIME, - ISACTIVE; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(4), - __member(8), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - CURRENTSTATE = layout.offsetof(2); - CHANGEDSINCELASTSYNC = layout.offsetof(3); - LASTCHANGETIME = layout.offsetof(4); - ISACTIVE = layout.offsetof(5); - } - - /** - * Creates a {@code XrActionStateBoolean} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrActionStateBoolean(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return the value of the {@code currentState} field. */ - @NativeType("XrBool32") - public boolean currentState() { return ncurrentState(address()) != 0; } - /** @return the value of the {@code changedSinceLastSync} field. */ - @NativeType("XrBool32") - public boolean changedSinceLastSync() { return nchangedSinceLastSync(address()) != 0; } - /** @return the value of the {@code lastChangeTime} field. */ - @NativeType("XrTime") - public long lastChangeTime() { return nlastChangeTime(address()); } - /** @return the value of the {@code isActive} field. */ - @NativeType("XrBool32") - public boolean isActive() { return nisActive(address()) != 0; } - - /** Sets the specified value to the {@code type} field. */ - public XrActionStateBoolean type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_ACTION_STATE_BOOLEAN TYPE_ACTION_STATE_BOOLEAN} value to the {@code type} field. */ - public XrActionStateBoolean type$Default() { return type(XR10.XR_TYPE_ACTION_STATE_BOOLEAN); } - /** Sets the specified value to the {@code next} field. */ - public XrActionStateBoolean next(@NativeType("void *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code currentState} field. */ - public XrActionStateBoolean currentState(@NativeType("XrBool32") boolean value) { ncurrentState(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@code changedSinceLastSync} field. */ - public XrActionStateBoolean changedSinceLastSync(@NativeType("XrBool32") boolean value) { nchangedSinceLastSync(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@code lastChangeTime} field. */ - public XrActionStateBoolean lastChangeTime(@NativeType("XrTime") long value) { nlastChangeTime(address(), value); return this; } - /** Sets the specified value to the {@code isActive} field. */ - public XrActionStateBoolean isActive(@NativeType("XrBool32") boolean value) { nisActive(address(), value ? 1 : 0); return this; } - - /** Initializes this struct with the specified values. */ - public XrActionStateBoolean set( - int type, - long next, - boolean currentState, - boolean changedSinceLastSync, - long lastChangeTime, - boolean isActive - ) { - type(type); - next(next); - currentState(currentState); - changedSinceLastSync(changedSinceLastSync); - lastChangeTime(lastChangeTime); - isActive(isActive); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrActionStateBoolean set(XrActionStateBoolean src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrActionStateBoolean} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrActionStateBoolean malloc() { - return wrap(XrActionStateBoolean.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrActionStateBoolean} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrActionStateBoolean calloc() { - return wrap(XrActionStateBoolean.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrActionStateBoolean} instance allocated with {@link BufferUtils}. */ - public static XrActionStateBoolean create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrActionStateBoolean.class, memAddress(container), container); - } - - /** Returns a new {@code XrActionStateBoolean} instance for the specified memory address. */ - public static XrActionStateBoolean create(long address) { - return wrap(XrActionStateBoolean.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrActionStateBoolean createSafe(long address) { - return address == NULL ? null : wrap(XrActionStateBoolean.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrActionStateBoolean.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrActionStateBoolean} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrActionStateBoolean malloc(MemoryStack stack) { - return wrap(XrActionStateBoolean.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrActionStateBoolean} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrActionStateBoolean calloc(MemoryStack stack) { - return wrap(XrActionStateBoolean.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrActionStateBoolean.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrActionStateBoolean.NEXT); } - /** Unsafe version of {@link #currentState}. */ - public static int ncurrentState(long struct) { return UNSAFE.getInt(null, struct + XrActionStateBoolean.CURRENTSTATE); } - /** Unsafe version of {@link #changedSinceLastSync}. */ - public static int nchangedSinceLastSync(long struct) { return UNSAFE.getInt(null, struct + XrActionStateBoolean.CHANGEDSINCELASTSYNC); } - /** Unsafe version of {@link #lastChangeTime}. */ - public static long nlastChangeTime(long struct) { return UNSAFE.getLong(null, struct + XrActionStateBoolean.LASTCHANGETIME); } - /** Unsafe version of {@link #isActive}. */ - public static int nisActive(long struct) { return UNSAFE.getInt(null, struct + XrActionStateBoolean.ISACTIVE); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrActionStateBoolean.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrActionStateBoolean.NEXT, value); } - /** Unsafe version of {@link #currentState(boolean) currentState}. */ - public static void ncurrentState(long struct, int value) { UNSAFE.putInt(null, struct + XrActionStateBoolean.CURRENTSTATE, value); } - /** Unsafe version of {@link #changedSinceLastSync(boolean) changedSinceLastSync}. */ - public static void nchangedSinceLastSync(long struct, int value) { UNSAFE.putInt(null, struct + XrActionStateBoolean.CHANGEDSINCELASTSYNC, value); } - /** Unsafe version of {@link #lastChangeTime(long) lastChangeTime}. */ - public static void nlastChangeTime(long struct, long value) { UNSAFE.putLong(null, struct + XrActionStateBoolean.LASTCHANGETIME, value); } - /** Unsafe version of {@link #isActive(boolean) isActive}. */ - public static void nisActive(long struct, int value) { UNSAFE.putInt(null, struct + XrActionStateBoolean.ISACTIVE, value); } - - // ----------------------------------- - - /** An array of {@link XrActionStateBoolean} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrActionStateBoolean ELEMENT_FACTORY = XrActionStateBoolean.create(-1L); - - /** - * Creates a new {@code XrActionStateBoolean.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrActionStateBoolean#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrActionStateBoolean getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrActionStateBoolean.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrActionStateBoolean.nnext(address()); } - /** @return the value of the {@code currentState} field. */ - @NativeType("XrBool32") - public boolean currentState() { return XrActionStateBoolean.ncurrentState(address()) != 0; } - /** @return the value of the {@code changedSinceLastSync} field. */ - @NativeType("XrBool32") - public boolean changedSinceLastSync() { return XrActionStateBoolean.nchangedSinceLastSync(address()) != 0; } - /** @return the value of the {@code lastChangeTime} field. */ - @NativeType("XrTime") - public long lastChangeTime() { return XrActionStateBoolean.nlastChangeTime(address()); } - /** @return the value of the {@code isActive} field. */ - @NativeType("XrBool32") - public boolean isActive() { return XrActionStateBoolean.nisActive(address()) != 0; } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrActionStateBoolean.ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_ACTION_STATE_BOOLEAN TYPE_ACTION_STATE_BOOLEAN} value to the {@code type} field. */ - public Buffer type$Default() { return type(XR10.XR_TYPE_ACTION_STATE_BOOLEAN); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrActionStateBoolean.nnext(address(), value); return this; } - /** Sets the specified value to the {@code currentState} field. */ - public Buffer currentState(@NativeType("XrBool32") boolean value) { XrActionStateBoolean.ncurrentState(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@code changedSinceLastSync} field. */ - public Buffer changedSinceLastSync(@NativeType("XrBool32") boolean value) { XrActionStateBoolean.nchangedSinceLastSync(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@code lastChangeTime} field. */ - public Buffer lastChangeTime(@NativeType("XrTime") long value) { XrActionStateBoolean.nlastChangeTime(address(), value); return this; } - /** Sets the specified value to the {@code isActive} field. */ - public Buffer isActive(@NativeType("XrBool32") boolean value) { XrActionStateBoolean.nisActive(address(), value ? 1 : 0); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrActionStateFloat.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrActionStateFloat.java deleted file mode 100644 index 7a727ec2..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrActionStateFloat.java +++ /dev/null @@ -1,357 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrActionStateFloat {
- *     XrStructureType type;
- *     void * next;
- *     float currentState;
- *     XrBool32 changedSinceLastSync;
- *     XrTime lastChangeTime;
- *     XrBool32 isActive;
- * }
- */ -public class XrActionStateFloat extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - CURRENTSTATE, - CHANGEDSINCELASTSYNC, - LASTCHANGETIME, - ISACTIVE; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(4), - __member(8), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - CURRENTSTATE = layout.offsetof(2); - CHANGEDSINCELASTSYNC = layout.offsetof(3); - LASTCHANGETIME = layout.offsetof(4); - ISACTIVE = layout.offsetof(5); - } - - /** - * Creates a {@code XrActionStateFloat} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrActionStateFloat(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return the value of the {@code currentState} field. */ - public float currentState() { return ncurrentState(address()); } - /** @return the value of the {@code changedSinceLastSync} field. */ - @NativeType("XrBool32") - public boolean changedSinceLastSync() { return nchangedSinceLastSync(address()) != 0; } - /** @return the value of the {@code lastChangeTime} field. */ - @NativeType("XrTime") - public long lastChangeTime() { return nlastChangeTime(address()); } - /** @return the value of the {@code isActive} field. */ - @NativeType("XrBool32") - public boolean isActive() { return nisActive(address()) != 0; } - - /** Sets the specified value to the {@code type} field. */ - public XrActionStateFloat type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_ACTION_STATE_FLOAT TYPE_ACTION_STATE_FLOAT} value to the {@code type} field. */ - public XrActionStateFloat type$Default() { return type(XR10.XR_TYPE_ACTION_STATE_FLOAT); } - /** Sets the specified value to the {@code next} field. */ - public XrActionStateFloat next(@NativeType("void *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code currentState} field. */ - public XrActionStateFloat currentState(float value) { ncurrentState(address(), value); return this; } - /** Sets the specified value to the {@code changedSinceLastSync} field. */ - public XrActionStateFloat changedSinceLastSync(@NativeType("XrBool32") boolean value) { nchangedSinceLastSync(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@code lastChangeTime} field. */ - public XrActionStateFloat lastChangeTime(@NativeType("XrTime") long value) { nlastChangeTime(address(), value); return this; } - /** Sets the specified value to the {@code isActive} field. */ - public XrActionStateFloat isActive(@NativeType("XrBool32") boolean value) { nisActive(address(), value ? 1 : 0); return this; } - - /** Initializes this struct with the specified values. */ - public XrActionStateFloat set( - int type, - long next, - float currentState, - boolean changedSinceLastSync, - long lastChangeTime, - boolean isActive - ) { - type(type); - next(next); - currentState(currentState); - changedSinceLastSync(changedSinceLastSync); - lastChangeTime(lastChangeTime); - isActive(isActive); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrActionStateFloat set(XrActionStateFloat src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrActionStateFloat} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrActionStateFloat malloc() { - return wrap(XrActionStateFloat.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrActionStateFloat} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrActionStateFloat calloc() { - return wrap(XrActionStateFloat.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrActionStateFloat} instance allocated with {@link BufferUtils}. */ - public static XrActionStateFloat create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrActionStateFloat.class, memAddress(container), container); - } - - /** Returns a new {@code XrActionStateFloat} instance for the specified memory address. */ - public static XrActionStateFloat create(long address) { - return wrap(XrActionStateFloat.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrActionStateFloat createSafe(long address) { - return address == NULL ? null : wrap(XrActionStateFloat.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrActionStateFloat.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrActionStateFloat} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrActionStateFloat malloc(MemoryStack stack) { - return wrap(XrActionStateFloat.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrActionStateFloat} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrActionStateFloat calloc(MemoryStack stack) { - return wrap(XrActionStateFloat.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrActionStateFloat.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrActionStateFloat.NEXT); } - /** Unsafe version of {@link #currentState}. */ - public static float ncurrentState(long struct) { return UNSAFE.getFloat(null, struct + XrActionStateFloat.CURRENTSTATE); } - /** Unsafe version of {@link #changedSinceLastSync}. */ - public static int nchangedSinceLastSync(long struct) { return UNSAFE.getInt(null, struct + XrActionStateFloat.CHANGEDSINCELASTSYNC); } - /** Unsafe version of {@link #lastChangeTime}. */ - public static long nlastChangeTime(long struct) { return UNSAFE.getLong(null, struct + XrActionStateFloat.LASTCHANGETIME); } - /** Unsafe version of {@link #isActive}. */ - public static int nisActive(long struct) { return UNSAFE.getInt(null, struct + XrActionStateFloat.ISACTIVE); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrActionStateFloat.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrActionStateFloat.NEXT, value); } - /** Unsafe version of {@link #currentState(float) currentState}. */ - public static void ncurrentState(long struct, float value) { UNSAFE.putFloat(null, struct + XrActionStateFloat.CURRENTSTATE, value); } - /** Unsafe version of {@link #changedSinceLastSync(boolean) changedSinceLastSync}. */ - public static void nchangedSinceLastSync(long struct, int value) { UNSAFE.putInt(null, struct + XrActionStateFloat.CHANGEDSINCELASTSYNC, value); } - /** Unsafe version of {@link #lastChangeTime(long) lastChangeTime}. */ - public static void nlastChangeTime(long struct, long value) { UNSAFE.putLong(null, struct + XrActionStateFloat.LASTCHANGETIME, value); } - /** Unsafe version of {@link #isActive(boolean) isActive}. */ - public static void nisActive(long struct, int value) { UNSAFE.putInt(null, struct + XrActionStateFloat.ISACTIVE, value); } - - // ----------------------------------- - - /** An array of {@link XrActionStateFloat} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrActionStateFloat ELEMENT_FACTORY = XrActionStateFloat.create(-1L); - - /** - * Creates a new {@code XrActionStateFloat.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrActionStateFloat#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrActionStateFloat getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrActionStateFloat.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrActionStateFloat.nnext(address()); } - /** @return the value of the {@code currentState} field. */ - public float currentState() { return XrActionStateFloat.ncurrentState(address()); } - /** @return the value of the {@code changedSinceLastSync} field. */ - @NativeType("XrBool32") - public boolean changedSinceLastSync() { return XrActionStateFloat.nchangedSinceLastSync(address()) != 0; } - /** @return the value of the {@code lastChangeTime} field. */ - @NativeType("XrTime") - public long lastChangeTime() { return XrActionStateFloat.nlastChangeTime(address()); } - /** @return the value of the {@code isActive} field. */ - @NativeType("XrBool32") - public boolean isActive() { return XrActionStateFloat.nisActive(address()) != 0; } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrActionStateFloat.ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_ACTION_STATE_FLOAT TYPE_ACTION_STATE_FLOAT} value to the {@code type} field. */ - public Buffer type$Default() { return type(XR10.XR_TYPE_ACTION_STATE_FLOAT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrActionStateFloat.nnext(address(), value); return this; } - /** Sets the specified value to the {@code currentState} field. */ - public Buffer currentState(float value) { XrActionStateFloat.ncurrentState(address(), value); return this; } - /** Sets the specified value to the {@code changedSinceLastSync} field. */ - public Buffer changedSinceLastSync(@NativeType("XrBool32") boolean value) { XrActionStateFloat.nchangedSinceLastSync(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@code lastChangeTime} field. */ - public Buffer lastChangeTime(@NativeType("XrTime") long value) { XrActionStateFloat.nlastChangeTime(address(), value); return this; } - /** Sets the specified value to the {@code isActive} field. */ - public Buffer isActive(@NativeType("XrBool32") boolean value) { XrActionStateFloat.nisActive(address(), value ? 1 : 0); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrActionStateGetInfo.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrActionStateGetInfo.java deleted file mode 100644 index 7218a32e..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrActionStateGetInfo.java +++ /dev/null @@ -1,341 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrActionStateGetInfo {
- *     XrStructureType type;
- *     void const * next;
- *     XrAction action;
- *     XrPath subactionPath;
- * }
- */ -public class XrActionStateGetInfo extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - ACTION, - SUBACTIONPATH; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(8) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - ACTION = layout.offsetof(2); - SUBACTIONPATH = layout.offsetof(3); - } - - /** - * Creates a {@code XrActionStateGetInfo} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrActionStateGetInfo(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code action} field. */ - @NativeType("XrAction") - public long action() { return naction(address()); } - /** @return the value of the {@code subactionPath} field. */ - @NativeType("XrPath") - public long subactionPath() { return nsubactionPath(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrActionStateGetInfo type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_ACTION_STATE_GET_INFO TYPE_ACTION_STATE_GET_INFO} value to the {@code type} field. */ - public XrActionStateGetInfo type$Default() { return type(XR10.XR_TYPE_ACTION_STATE_GET_INFO); } - /** Sets the specified value to the {@code next} field. */ - public XrActionStateGetInfo next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code action} field. */ - public XrActionStateGetInfo action(XrAction value) { naction(address(), value); return this; } - /** Sets the specified value to the {@code subactionPath} field. */ - public XrActionStateGetInfo subactionPath(@NativeType("XrPath") long value) { nsubactionPath(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrActionStateGetInfo set( - int type, - long next, - XrAction action, - long subactionPath - ) { - type(type); - next(next); - action(action); - subactionPath(subactionPath); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrActionStateGetInfo set(XrActionStateGetInfo src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrActionStateGetInfo} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrActionStateGetInfo malloc() { - return wrap(XrActionStateGetInfo.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrActionStateGetInfo} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrActionStateGetInfo calloc() { - return wrap(XrActionStateGetInfo.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrActionStateGetInfo} instance allocated with {@link BufferUtils}. */ - public static XrActionStateGetInfo create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrActionStateGetInfo.class, memAddress(container), container); - } - - /** Returns a new {@code XrActionStateGetInfo} instance for the specified memory address. */ - public static XrActionStateGetInfo create(long address) { - return wrap(XrActionStateGetInfo.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrActionStateGetInfo createSafe(long address) { - return address == NULL ? null : wrap(XrActionStateGetInfo.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrActionStateGetInfo.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrActionStateGetInfo} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrActionStateGetInfo malloc(MemoryStack stack) { - return wrap(XrActionStateGetInfo.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrActionStateGetInfo} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrActionStateGetInfo calloc(MemoryStack stack) { - return wrap(XrActionStateGetInfo.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrActionStateGetInfo.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrActionStateGetInfo.NEXT); } - /** Unsafe version of {@link #action}. */ - public static long naction(long struct) { return memGetAddress(struct + XrActionStateGetInfo.ACTION); } - /** Unsafe version of {@link #subactionPath}. */ - public static long nsubactionPath(long struct) { return UNSAFE.getLong(null, struct + XrActionStateGetInfo.SUBACTIONPATH); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrActionStateGetInfo.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrActionStateGetInfo.NEXT, value); } - /** Unsafe version of {@link #action(XrAction) action}. */ - public static void naction(long struct, XrAction value) { memPutAddress(struct + XrActionStateGetInfo.ACTION, value.address()); } - /** Unsafe version of {@link #subactionPath(long) subactionPath}. */ - public static void nsubactionPath(long struct, long value) { UNSAFE.putLong(null, struct + XrActionStateGetInfo.SUBACTIONPATH, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XrActionStateGetInfo.ACTION)); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrActionStateGetInfo} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrActionStateGetInfo ELEMENT_FACTORY = XrActionStateGetInfo.create(-1L); - - /** - * Creates a new {@code XrActionStateGetInfo.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrActionStateGetInfo#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrActionStateGetInfo getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrActionStateGetInfo.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrActionStateGetInfo.nnext(address()); } - /** @return the value of the {@code action} field. */ - @NativeType("XrAction") - public long action() { return XrActionStateGetInfo.naction(address()); } - /** @return the value of the {@code subactionPath} field. */ - @NativeType("XrPath") - public long subactionPath() { return XrActionStateGetInfo.nsubactionPath(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrActionStateGetInfo.ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_ACTION_STATE_GET_INFO TYPE_ACTION_STATE_GET_INFO} value to the {@code type} field. */ - public Buffer type$Default() { return type(XR10.XR_TYPE_ACTION_STATE_GET_INFO); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrActionStateGetInfo.nnext(address(), value); return this; } - /** Sets the specified value to the {@code action} field. */ - public Buffer action(XrAction value) { XrActionStateGetInfo.naction(address(), value); return this; } - /** Sets the specified value to the {@code subactionPath} field. */ - public Buffer subactionPath(@NativeType("XrPath") long value) { XrActionStateGetInfo.nsubactionPath(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrActionStatePose.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrActionStatePose.java deleted file mode 100644 index c726a7d4..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrActionStatePose.java +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrActionStatePose {
- *     XrStructureType type;
- *     void * next;
- *     XrBool32 isActive;
- * }
- */ -public class XrActionStatePose extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - ISACTIVE; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - ISACTIVE = layout.offsetof(2); - } - - /** - * Creates a {@code XrActionStatePose} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrActionStatePose(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return the value of the {@code isActive} field. */ - @NativeType("XrBool32") - public boolean isActive() { return nisActive(address()) != 0; } - - /** Sets the specified value to the {@code type} field. */ - public XrActionStatePose type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_ACTION_STATE_POSE TYPE_ACTION_STATE_POSE} value to the {@code type} field. */ - public XrActionStatePose type$Default() { return type(XR10.XR_TYPE_ACTION_STATE_POSE); } - /** Sets the specified value to the {@code next} field. */ - public XrActionStatePose next(@NativeType("void *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code isActive} field. */ - public XrActionStatePose isActive(@NativeType("XrBool32") boolean value) { nisActive(address(), value ? 1 : 0); return this; } - - /** Initializes this struct with the specified values. */ - public XrActionStatePose set( - int type, - long next, - boolean isActive - ) { - type(type); - next(next); - isActive(isActive); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrActionStatePose set(XrActionStatePose src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrActionStatePose} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrActionStatePose malloc() { - return wrap(XrActionStatePose.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrActionStatePose} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrActionStatePose calloc() { - return wrap(XrActionStatePose.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrActionStatePose} instance allocated with {@link BufferUtils}. */ - public static XrActionStatePose create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrActionStatePose.class, memAddress(container), container); - } - - /** Returns a new {@code XrActionStatePose} instance for the specified memory address. */ - public static XrActionStatePose create(long address) { - return wrap(XrActionStatePose.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrActionStatePose createSafe(long address) { - return address == NULL ? null : wrap(XrActionStatePose.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrActionStatePose.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrActionStatePose} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrActionStatePose malloc(MemoryStack stack) { - return wrap(XrActionStatePose.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrActionStatePose} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrActionStatePose calloc(MemoryStack stack) { - return wrap(XrActionStatePose.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrActionStatePose.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrActionStatePose.NEXT); } - /** Unsafe version of {@link #isActive}. */ - public static int nisActive(long struct) { return UNSAFE.getInt(null, struct + XrActionStatePose.ISACTIVE); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrActionStatePose.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrActionStatePose.NEXT, value); } - /** Unsafe version of {@link #isActive(boolean) isActive}. */ - public static void nisActive(long struct, int value) { UNSAFE.putInt(null, struct + XrActionStatePose.ISACTIVE, value); } - - // ----------------------------------- - - /** An array of {@link XrActionStatePose} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrActionStatePose ELEMENT_FACTORY = XrActionStatePose.create(-1L); - - /** - * Creates a new {@code XrActionStatePose.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrActionStatePose#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrActionStatePose getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrActionStatePose.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrActionStatePose.nnext(address()); } - /** @return the value of the {@code isActive} field. */ - @NativeType("XrBool32") - public boolean isActive() { return XrActionStatePose.nisActive(address()) != 0; } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrActionStatePose.ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_ACTION_STATE_POSE TYPE_ACTION_STATE_POSE} value to the {@code type} field. */ - public Buffer type$Default() { return type(XR10.XR_TYPE_ACTION_STATE_POSE); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrActionStatePose.nnext(address(), value); return this; } - /** Sets the specified value to the {@code isActive} field. */ - public Buffer isActive(@NativeType("XrBool32") boolean value) { XrActionStatePose.nisActive(address(), value ? 1 : 0); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrActionStateVector2f.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrActionStateVector2f.java deleted file mode 100644 index f535f102..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrActionStateVector2f.java +++ /dev/null @@ -1,361 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrActionStateVector2f {
- *     XrStructureType type;
- *     void * next;
- *     {@link XrVector2f XrVector2f} currentState;
- *     XrBool32 changedSinceLastSync;
- *     XrTime lastChangeTime;
- *     XrBool32 isActive;
- * }
- */ -public class XrActionStateVector2f extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - CURRENTSTATE, - CHANGEDSINCELASTSYNC, - LASTCHANGETIME, - ISACTIVE; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(XrVector2f.SIZEOF, XrVector2f.ALIGNOF), - __member(4), - __member(8), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - CURRENTSTATE = layout.offsetof(2); - CHANGEDSINCELASTSYNC = layout.offsetof(3); - LASTCHANGETIME = layout.offsetof(4); - ISACTIVE = layout.offsetof(5); - } - - /** - * Creates a {@code XrActionStateVector2f} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrActionStateVector2f(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return a {@link XrVector2f} view of the {@code currentState} field. */ - public XrVector2f currentState() { return ncurrentState(address()); } - /** @return the value of the {@code changedSinceLastSync} field. */ - @NativeType("XrBool32") - public boolean changedSinceLastSync() { return nchangedSinceLastSync(address()) != 0; } - /** @return the value of the {@code lastChangeTime} field. */ - @NativeType("XrTime") - public long lastChangeTime() { return nlastChangeTime(address()); } - /** @return the value of the {@code isActive} field. */ - @NativeType("XrBool32") - public boolean isActive() { return nisActive(address()) != 0; } - - /** Sets the specified value to the {@code type} field. */ - public XrActionStateVector2f type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_ACTION_STATE_VECTOR2F TYPE_ACTION_STATE_VECTOR2F} value to the {@code type} field. */ - public XrActionStateVector2f type$Default() { return type(XR10.XR_TYPE_ACTION_STATE_VECTOR2F); } - /** Sets the specified value to the {@code next} field. */ - public XrActionStateVector2f next(@NativeType("void *") long value) { nnext(address(), value); return this; } - /** Copies the specified {@link XrVector2f} to the {@code currentState} field. */ - public XrActionStateVector2f currentState(XrVector2f value) { ncurrentState(address(), value); return this; } - /** Passes the {@code currentState} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrActionStateVector2f currentState(java.util.function.Consumer consumer) { consumer.accept(currentState()); return this; } - /** Sets the specified value to the {@code changedSinceLastSync} field. */ - public XrActionStateVector2f changedSinceLastSync(@NativeType("XrBool32") boolean value) { nchangedSinceLastSync(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@code lastChangeTime} field. */ - public XrActionStateVector2f lastChangeTime(@NativeType("XrTime") long value) { nlastChangeTime(address(), value); return this; } - /** Sets the specified value to the {@code isActive} field. */ - public XrActionStateVector2f isActive(@NativeType("XrBool32") boolean value) { nisActive(address(), value ? 1 : 0); return this; } - - /** Initializes this struct with the specified values. */ - public XrActionStateVector2f set( - int type, - long next, - XrVector2f currentState, - boolean changedSinceLastSync, - long lastChangeTime, - boolean isActive - ) { - type(type); - next(next); - currentState(currentState); - changedSinceLastSync(changedSinceLastSync); - lastChangeTime(lastChangeTime); - isActive(isActive); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrActionStateVector2f set(XrActionStateVector2f src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrActionStateVector2f} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrActionStateVector2f malloc() { - return wrap(XrActionStateVector2f.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrActionStateVector2f} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrActionStateVector2f calloc() { - return wrap(XrActionStateVector2f.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrActionStateVector2f} instance allocated with {@link BufferUtils}. */ - public static XrActionStateVector2f create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrActionStateVector2f.class, memAddress(container), container); - } - - /** Returns a new {@code XrActionStateVector2f} instance for the specified memory address. */ - public static XrActionStateVector2f create(long address) { - return wrap(XrActionStateVector2f.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrActionStateVector2f createSafe(long address) { - return address == NULL ? null : wrap(XrActionStateVector2f.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrActionStateVector2f.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrActionStateVector2f} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrActionStateVector2f malloc(MemoryStack stack) { - return wrap(XrActionStateVector2f.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrActionStateVector2f} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrActionStateVector2f calloc(MemoryStack stack) { - return wrap(XrActionStateVector2f.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrActionStateVector2f.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrActionStateVector2f.NEXT); } - /** Unsafe version of {@link #currentState}. */ - public static XrVector2f ncurrentState(long struct) { return XrVector2f.create(struct + XrActionStateVector2f.CURRENTSTATE); } - /** Unsafe version of {@link #changedSinceLastSync}. */ - public static int nchangedSinceLastSync(long struct) { return UNSAFE.getInt(null, struct + XrActionStateVector2f.CHANGEDSINCELASTSYNC); } - /** Unsafe version of {@link #lastChangeTime}. */ - public static long nlastChangeTime(long struct) { return UNSAFE.getLong(null, struct + XrActionStateVector2f.LASTCHANGETIME); } - /** Unsafe version of {@link #isActive}. */ - public static int nisActive(long struct) { return UNSAFE.getInt(null, struct + XrActionStateVector2f.ISACTIVE); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrActionStateVector2f.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrActionStateVector2f.NEXT, value); } - /** Unsafe version of {@link #currentState(XrVector2f) currentState}. */ - public static void ncurrentState(long struct, XrVector2f value) { memCopy(value.address(), struct + XrActionStateVector2f.CURRENTSTATE, XrVector2f.SIZEOF); } - /** Unsafe version of {@link #changedSinceLastSync(boolean) changedSinceLastSync}. */ - public static void nchangedSinceLastSync(long struct, int value) { UNSAFE.putInt(null, struct + XrActionStateVector2f.CHANGEDSINCELASTSYNC, value); } - /** Unsafe version of {@link #lastChangeTime(long) lastChangeTime}. */ - public static void nlastChangeTime(long struct, long value) { UNSAFE.putLong(null, struct + XrActionStateVector2f.LASTCHANGETIME, value); } - /** Unsafe version of {@link #isActive(boolean) isActive}. */ - public static void nisActive(long struct, int value) { UNSAFE.putInt(null, struct + XrActionStateVector2f.ISACTIVE, value); } - - // ----------------------------------- - - /** An array of {@link XrActionStateVector2f} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrActionStateVector2f ELEMENT_FACTORY = XrActionStateVector2f.create(-1L); - - /** - * Creates a new {@code XrActionStateVector2f.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrActionStateVector2f#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrActionStateVector2f getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrActionStateVector2f.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrActionStateVector2f.nnext(address()); } - /** @return a {@link XrVector2f} view of the {@code currentState} field. */ - public XrVector2f currentState() { return XrActionStateVector2f.ncurrentState(address()); } - /** @return the value of the {@code changedSinceLastSync} field. */ - @NativeType("XrBool32") - public boolean changedSinceLastSync() { return XrActionStateVector2f.nchangedSinceLastSync(address()) != 0; } - /** @return the value of the {@code lastChangeTime} field. */ - @NativeType("XrTime") - public long lastChangeTime() { return XrActionStateVector2f.nlastChangeTime(address()); } - /** @return the value of the {@code isActive} field. */ - @NativeType("XrBool32") - public boolean isActive() { return XrActionStateVector2f.nisActive(address()) != 0; } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrActionStateVector2f.ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_ACTION_STATE_VECTOR2F TYPE_ACTION_STATE_VECTOR2F} value to the {@code type} field. */ - public Buffer type$Default() { return type(XR10.XR_TYPE_ACTION_STATE_VECTOR2F); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrActionStateVector2f.nnext(address(), value); return this; } - /** Copies the specified {@link XrVector2f} to the {@code currentState} field. */ - public Buffer currentState(XrVector2f value) { XrActionStateVector2f.ncurrentState(address(), value); return this; } - /** Passes the {@code currentState} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer currentState(java.util.function.Consumer consumer) { consumer.accept(currentState()); return this; } - /** Sets the specified value to the {@code changedSinceLastSync} field. */ - public Buffer changedSinceLastSync(@NativeType("XrBool32") boolean value) { XrActionStateVector2f.nchangedSinceLastSync(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@code lastChangeTime} field. */ - public Buffer lastChangeTime(@NativeType("XrTime") long value) { XrActionStateVector2f.nlastChangeTime(address(), value); return this; } - /** Sets the specified value to the {@code isActive} field. */ - public Buffer isActive(@NativeType("XrBool32") boolean value) { XrActionStateVector2f.nisActive(address(), value ? 1 : 0); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrActionSuggestedBinding.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrActionSuggestedBinding.java deleted file mode 100644 index 6c1945f3..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrActionSuggestedBinding.java +++ /dev/null @@ -1,297 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrActionSuggestedBinding {
- *     XrAction action;
- *     XrPath binding;
- * }
- */ -public class XrActionSuggestedBinding extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - ACTION, - BINDING; - - static { - Layout layout = __struct( - __member(POINTER_SIZE), - __member(8) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - ACTION = layout.offsetof(0); - BINDING = layout.offsetof(1); - } - - /** - * Creates a {@code XrActionSuggestedBinding} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrActionSuggestedBinding(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code action} field. */ - @NativeType("XrAction") - public long action() { return naction(address()); } - /** @return the value of the {@code binding} field. */ - @NativeType("XrPath") - public long binding() { return nbinding(address()); } - - /** Sets the specified value to the {@code action} field. */ - public XrActionSuggestedBinding action(XrAction value) { naction(address(), value); return this; } - /** Sets the specified value to the {@code binding} field. */ - public XrActionSuggestedBinding binding(@NativeType("XrPath") long value) { nbinding(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrActionSuggestedBinding set( - XrAction action, - long binding - ) { - action(action); - binding(binding); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrActionSuggestedBinding set(XrActionSuggestedBinding src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrActionSuggestedBinding} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrActionSuggestedBinding malloc() { - return wrap(XrActionSuggestedBinding.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrActionSuggestedBinding} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrActionSuggestedBinding calloc() { - return wrap(XrActionSuggestedBinding.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrActionSuggestedBinding} instance allocated with {@link BufferUtils}. */ - public static XrActionSuggestedBinding create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrActionSuggestedBinding.class, memAddress(container), container); - } - - /** Returns a new {@code XrActionSuggestedBinding} instance for the specified memory address. */ - public static XrActionSuggestedBinding create(long address) { - return wrap(XrActionSuggestedBinding.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrActionSuggestedBinding createSafe(long address) { - return address == NULL ? null : wrap(XrActionSuggestedBinding.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrActionSuggestedBinding.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrActionSuggestedBinding} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrActionSuggestedBinding malloc(MemoryStack stack) { - return wrap(XrActionSuggestedBinding.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrActionSuggestedBinding} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrActionSuggestedBinding calloc(MemoryStack stack) { - return wrap(XrActionSuggestedBinding.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #action}. */ - public static long naction(long struct) { return memGetAddress(struct + XrActionSuggestedBinding.ACTION); } - /** Unsafe version of {@link #binding}. */ - public static long nbinding(long struct) { return UNSAFE.getLong(null, struct + XrActionSuggestedBinding.BINDING); } - - /** Unsafe version of {@link #action(XrAction) action}. */ - public static void naction(long struct, XrAction value) { memPutAddress(struct + XrActionSuggestedBinding.ACTION, value.address()); } - /** Unsafe version of {@link #binding(long) binding}. */ - public static void nbinding(long struct, long value) { UNSAFE.putLong(null, struct + XrActionSuggestedBinding.BINDING, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XrActionSuggestedBinding.ACTION)); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrActionSuggestedBinding} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrActionSuggestedBinding ELEMENT_FACTORY = XrActionSuggestedBinding.create(-1L); - - /** - * Creates a new {@code XrActionSuggestedBinding.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrActionSuggestedBinding#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrActionSuggestedBinding getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code action} field. */ - @NativeType("XrAction") - public long action() { return XrActionSuggestedBinding.naction(address()); } - /** @return the value of the {@code binding} field. */ - @NativeType("XrPath") - public long binding() { return XrActionSuggestedBinding.nbinding(address()); } - - /** Sets the specified value to the {@code action} field. */ - public Buffer action(XrAction value) { XrActionSuggestedBinding.naction(address(), value); return this; } - /** Sets the specified value to the {@code binding} field. */ - public Buffer binding(@NativeType("XrPath") long value) { XrActionSuggestedBinding.nbinding(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrActionsSyncInfo.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrActionsSyncInfo.java deleted file mode 100644 index d923cc95..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrActionsSyncInfo.java +++ /dev/null @@ -1,321 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrActionsSyncInfo {
- *     XrStructureType type;
- *     void const * next;
- *     uint32_t countActiveActionSets;
- *     {@link XrActiveActionSet XrActiveActionSet} const * activeActionSets;
- * }
- */ -public class XrActionsSyncInfo extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - COUNTACTIVEACTIONSETS, - ACTIVEACTIONSETS; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - COUNTACTIVEACTIONSETS = layout.offsetof(2); - ACTIVEACTIONSETS = layout.offsetof(3); - } - - /** - * Creates a {@code XrActionsSyncInfo} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrActionsSyncInfo(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code countActiveActionSets} field. */ - @NativeType("uint32_t") - public int countActiveActionSets() { return ncountActiveActionSets(address()); } - /** @return a {@link XrActiveActionSet.Buffer} view of the struct array pointed to by the {@code activeActionSets} field. */ - @Nullable - @NativeType("XrActiveActionSet const *") - public XrActiveActionSet.Buffer activeActionSets() { return nactiveActionSets(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrActionsSyncInfo type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_ACTIONS_SYNC_INFO TYPE_ACTIONS_SYNC_INFO} value to the {@code type} field. */ - public XrActionsSyncInfo type$Default() { return type(XR10.XR_TYPE_ACTIONS_SYNC_INFO); } - /** Sets the specified value to the {@code next} field. */ - public XrActionsSyncInfo next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code countActiveActionSets} field. */ - public XrActionsSyncInfo countActiveActionSets(@NativeType("uint32_t") int value) { ncountActiveActionSets(address(), value); return this; } - /** Sets the address of the specified {@link XrActiveActionSet.Buffer} to the {@code activeActionSets} field. */ - public XrActionsSyncInfo activeActionSets(@Nullable @NativeType("XrActiveActionSet const *") XrActiveActionSet.Buffer value) { nactiveActionSets(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrActionsSyncInfo set( - int type, - long next, - int countActiveActionSets, - @Nullable XrActiveActionSet.Buffer activeActionSets - ) { - type(type); - next(next); - countActiveActionSets(countActiveActionSets); - activeActionSets(activeActionSets); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrActionsSyncInfo set(XrActionsSyncInfo src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrActionsSyncInfo} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrActionsSyncInfo malloc() { - return wrap(XrActionsSyncInfo.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrActionsSyncInfo} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrActionsSyncInfo calloc() { - return wrap(XrActionsSyncInfo.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrActionsSyncInfo} instance allocated with {@link BufferUtils}. */ - public static XrActionsSyncInfo create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrActionsSyncInfo.class, memAddress(container), container); - } - - /** Returns a new {@code XrActionsSyncInfo} instance for the specified memory address. */ - public static XrActionsSyncInfo create(long address) { - return wrap(XrActionsSyncInfo.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrActionsSyncInfo createSafe(long address) { - return address == NULL ? null : wrap(XrActionsSyncInfo.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrActionsSyncInfo.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrActionsSyncInfo} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrActionsSyncInfo malloc(MemoryStack stack) { - return wrap(XrActionsSyncInfo.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrActionsSyncInfo} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrActionsSyncInfo calloc(MemoryStack stack) { - return wrap(XrActionsSyncInfo.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrActionsSyncInfo.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrActionsSyncInfo.NEXT); } - /** Unsafe version of {@link #countActiveActionSets}. */ - public static int ncountActiveActionSets(long struct) { return UNSAFE.getInt(null, struct + XrActionsSyncInfo.COUNTACTIVEACTIONSETS); } - /** Unsafe version of {@link #activeActionSets}. */ - @Nullable public static XrActiveActionSet.Buffer nactiveActionSets(long struct) { return XrActiveActionSet.createSafe(memGetAddress(struct + XrActionsSyncInfo.ACTIVEACTIONSETS), ncountActiveActionSets(struct)); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrActionsSyncInfo.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrActionsSyncInfo.NEXT, value); } - /** Sets the specified value to the {@code countActiveActionSets} field of the specified {@code struct}. */ - public static void ncountActiveActionSets(long struct, int value) { UNSAFE.putInt(null, struct + XrActionsSyncInfo.COUNTACTIVEACTIONSETS, value); } - /** Unsafe version of {@link #activeActionSets(XrActiveActionSet.Buffer) activeActionSets}. */ - public static void nactiveActionSets(long struct, @Nullable XrActiveActionSet.Buffer value) { memPutAddress(struct + XrActionsSyncInfo.ACTIVEACTIONSETS, memAddressSafe(value)); if (value != null) { ncountActiveActionSets(struct, value.remaining()); } } - - // ----------------------------------- - - /** An array of {@link XrActionsSyncInfo} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrActionsSyncInfo ELEMENT_FACTORY = XrActionsSyncInfo.create(-1L); - - /** - * Creates a new {@code XrActionsSyncInfo.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrActionsSyncInfo#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrActionsSyncInfo getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrActionsSyncInfo.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrActionsSyncInfo.nnext(address()); } - /** @return the value of the {@code countActiveActionSets} field. */ - @NativeType("uint32_t") - public int countActiveActionSets() { return XrActionsSyncInfo.ncountActiveActionSets(address()); } - /** @return a {@link XrActiveActionSet.Buffer} view of the struct array pointed to by the {@code activeActionSets} field. */ - @Nullable - @NativeType("XrActiveActionSet const *") - public XrActiveActionSet.Buffer activeActionSets() { return XrActionsSyncInfo.nactiveActionSets(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrActionsSyncInfo.ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_ACTIONS_SYNC_INFO TYPE_ACTIONS_SYNC_INFO} value to the {@code type} field. */ - public Buffer type$Default() { return type(XR10.XR_TYPE_ACTIONS_SYNC_INFO); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrActionsSyncInfo.nnext(address(), value); return this; } - /** Sets the specified value to the {@code countActiveActionSets} field. */ - public Buffer countActiveActionSets(@NativeType("uint32_t") int value) { XrActionsSyncInfo.ncountActiveActionSets(address(), value); return this; } - /** Sets the address of the specified {@link XrActiveActionSet.Buffer} to the {@code activeActionSets} field. */ - public Buffer activeActionSets(@Nullable @NativeType("XrActiveActionSet const *") XrActiveActionSet.Buffer value) { XrActionsSyncInfo.nactiveActionSets(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrActiveActionSet.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrActiveActionSet.java deleted file mode 100644 index a74b2bc9..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrActiveActionSet.java +++ /dev/null @@ -1,297 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrActiveActionSet {
- *     XrActionSet actionSet;
- *     XrPath subactionPath;
- * }
- */ -public class XrActiveActionSet extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - ACTIONSET, - SUBACTIONPATH; - - static { - Layout layout = __struct( - __member(POINTER_SIZE), - __member(8) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - ACTIONSET = layout.offsetof(0); - SUBACTIONPATH = layout.offsetof(1); - } - - /** - * Creates a {@code XrActiveActionSet} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrActiveActionSet(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code actionSet} field. */ - @NativeType("XrActionSet") - public long actionSet() { return nactionSet(address()); } - /** @return the value of the {@code subactionPath} field. */ - @NativeType("XrPath") - public long subactionPath() { return nsubactionPath(address()); } - - /** Sets the specified value to the {@code actionSet} field. */ - public XrActiveActionSet actionSet(XrActionSet value) { nactionSet(address(), value); return this; } - /** Sets the specified value to the {@code subactionPath} field. */ - public XrActiveActionSet subactionPath(@NativeType("XrPath") long value) { nsubactionPath(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrActiveActionSet set( - XrActionSet actionSet, - long subactionPath - ) { - actionSet(actionSet); - subactionPath(subactionPath); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrActiveActionSet set(XrActiveActionSet src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrActiveActionSet} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrActiveActionSet malloc() { - return wrap(XrActiveActionSet.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrActiveActionSet} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrActiveActionSet calloc() { - return wrap(XrActiveActionSet.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrActiveActionSet} instance allocated with {@link BufferUtils}. */ - public static XrActiveActionSet create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrActiveActionSet.class, memAddress(container), container); - } - - /** Returns a new {@code XrActiveActionSet} instance for the specified memory address. */ - public static XrActiveActionSet create(long address) { - return wrap(XrActiveActionSet.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrActiveActionSet createSafe(long address) { - return address == NULL ? null : wrap(XrActiveActionSet.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrActiveActionSet.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrActiveActionSet} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrActiveActionSet malloc(MemoryStack stack) { - return wrap(XrActiveActionSet.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrActiveActionSet} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrActiveActionSet calloc(MemoryStack stack) { - return wrap(XrActiveActionSet.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #actionSet}. */ - public static long nactionSet(long struct) { return memGetAddress(struct + XrActiveActionSet.ACTIONSET); } - /** Unsafe version of {@link #subactionPath}. */ - public static long nsubactionPath(long struct) { return UNSAFE.getLong(null, struct + XrActiveActionSet.SUBACTIONPATH); } - - /** Unsafe version of {@link #actionSet(XrActionSet) actionSet}. */ - public static void nactionSet(long struct, XrActionSet value) { memPutAddress(struct + XrActiveActionSet.ACTIONSET, value.address()); } - /** Unsafe version of {@link #subactionPath(long) subactionPath}. */ - public static void nsubactionPath(long struct, long value) { UNSAFE.putLong(null, struct + XrActiveActionSet.SUBACTIONPATH, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XrActiveActionSet.ACTIONSET)); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrActiveActionSet} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrActiveActionSet ELEMENT_FACTORY = XrActiveActionSet.create(-1L); - - /** - * Creates a new {@code XrActiveActionSet.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrActiveActionSet#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrActiveActionSet getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code actionSet} field. */ - @NativeType("XrActionSet") - public long actionSet() { return XrActiveActionSet.nactionSet(address()); } - /** @return the value of the {@code subactionPath} field. */ - @NativeType("XrPath") - public long subactionPath() { return XrActiveActionSet.nsubactionPath(address()); } - - /** Sets the specified value to the {@code actionSet} field. */ - public Buffer actionSet(XrActionSet value) { XrActiveActionSet.nactionSet(address(), value); return this; } - /** Sets the specified value to the {@code subactionPath} field. */ - public Buffer subactionPath(@NativeType("XrPath") long value) { XrActiveActionSet.nsubactionPath(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrAndroidSurfaceSwapchainCreateInfoFB.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrAndroidSurfaceSwapchainCreateInfoFB.java deleted file mode 100644 index f46894a7..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrAndroidSurfaceSwapchainCreateInfoFB.java +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrAndroidSurfaceSwapchainCreateInfoFB {
- *     XrStructureType type;
- *     void const * next;
- *     XrAndroidSurfaceSwapchainFlagsFB createFlags;
- * }
- */ -public class XrAndroidSurfaceSwapchainCreateInfoFB extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - CREATEFLAGS; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(8) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - CREATEFLAGS = layout.offsetof(2); - } - - /** - * Creates a {@code XrAndroidSurfaceSwapchainCreateInfoFB} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrAndroidSurfaceSwapchainCreateInfoFB(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code createFlags} field. */ - @NativeType("XrAndroidSurfaceSwapchainFlagsFB") - public long createFlags() { return ncreateFlags(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrAndroidSurfaceSwapchainCreateInfoFB type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link FBAndroidSurfaceSwapchainCreate#XR_TYPE_ANDROID_SURFACE_SWAPCHAIN_CREATE_INFO_FB TYPE_ANDROID_SURFACE_SWAPCHAIN_CREATE_INFO_FB} value to the {@code type} field. */ - public XrAndroidSurfaceSwapchainCreateInfoFB type$Default() { return type(FBAndroidSurfaceSwapchainCreate.XR_TYPE_ANDROID_SURFACE_SWAPCHAIN_CREATE_INFO_FB); } - /** Sets the specified value to the {@code next} field. */ - public XrAndroidSurfaceSwapchainCreateInfoFB next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code createFlags} field. */ - public XrAndroidSurfaceSwapchainCreateInfoFB createFlags(@NativeType("XrAndroidSurfaceSwapchainFlagsFB") long value) { ncreateFlags(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrAndroidSurfaceSwapchainCreateInfoFB set( - int type, - long next, - long createFlags - ) { - type(type); - next(next); - createFlags(createFlags); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrAndroidSurfaceSwapchainCreateInfoFB set(XrAndroidSurfaceSwapchainCreateInfoFB src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrAndroidSurfaceSwapchainCreateInfoFB} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrAndroidSurfaceSwapchainCreateInfoFB malloc() { - return wrap(XrAndroidSurfaceSwapchainCreateInfoFB.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrAndroidSurfaceSwapchainCreateInfoFB} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrAndroidSurfaceSwapchainCreateInfoFB calloc() { - return wrap(XrAndroidSurfaceSwapchainCreateInfoFB.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrAndroidSurfaceSwapchainCreateInfoFB} instance allocated with {@link BufferUtils}. */ - public static XrAndroidSurfaceSwapchainCreateInfoFB create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrAndroidSurfaceSwapchainCreateInfoFB.class, memAddress(container), container); - } - - /** Returns a new {@code XrAndroidSurfaceSwapchainCreateInfoFB} instance for the specified memory address. */ - public static XrAndroidSurfaceSwapchainCreateInfoFB create(long address) { - return wrap(XrAndroidSurfaceSwapchainCreateInfoFB.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrAndroidSurfaceSwapchainCreateInfoFB createSafe(long address) { - return address == NULL ? null : wrap(XrAndroidSurfaceSwapchainCreateInfoFB.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrAndroidSurfaceSwapchainCreateInfoFB.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrAndroidSurfaceSwapchainCreateInfoFB} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrAndroidSurfaceSwapchainCreateInfoFB malloc(MemoryStack stack) { - return wrap(XrAndroidSurfaceSwapchainCreateInfoFB.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrAndroidSurfaceSwapchainCreateInfoFB} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrAndroidSurfaceSwapchainCreateInfoFB calloc(MemoryStack stack) { - return wrap(XrAndroidSurfaceSwapchainCreateInfoFB.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrAndroidSurfaceSwapchainCreateInfoFB.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrAndroidSurfaceSwapchainCreateInfoFB.NEXT); } - /** Unsafe version of {@link #createFlags}. */ - public static long ncreateFlags(long struct) { return UNSAFE.getLong(null, struct + XrAndroidSurfaceSwapchainCreateInfoFB.CREATEFLAGS); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrAndroidSurfaceSwapchainCreateInfoFB.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrAndroidSurfaceSwapchainCreateInfoFB.NEXT, value); } - /** Unsafe version of {@link #createFlags(long) createFlags}. */ - public static void ncreateFlags(long struct, long value) { UNSAFE.putLong(null, struct + XrAndroidSurfaceSwapchainCreateInfoFB.CREATEFLAGS, value); } - - // ----------------------------------- - - /** An array of {@link XrAndroidSurfaceSwapchainCreateInfoFB} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrAndroidSurfaceSwapchainCreateInfoFB ELEMENT_FACTORY = XrAndroidSurfaceSwapchainCreateInfoFB.create(-1L); - - /** - * Creates a new {@code XrAndroidSurfaceSwapchainCreateInfoFB.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrAndroidSurfaceSwapchainCreateInfoFB#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrAndroidSurfaceSwapchainCreateInfoFB getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrAndroidSurfaceSwapchainCreateInfoFB.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrAndroidSurfaceSwapchainCreateInfoFB.nnext(address()); } - /** @return the value of the {@code createFlags} field. */ - @NativeType("XrAndroidSurfaceSwapchainFlagsFB") - public long createFlags() { return XrAndroidSurfaceSwapchainCreateInfoFB.ncreateFlags(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrAndroidSurfaceSwapchainCreateInfoFB.ntype(address(), value); return this; } - /** Sets the {@link FBAndroidSurfaceSwapchainCreate#XR_TYPE_ANDROID_SURFACE_SWAPCHAIN_CREATE_INFO_FB TYPE_ANDROID_SURFACE_SWAPCHAIN_CREATE_INFO_FB} value to the {@code type} field. */ - public Buffer type$Default() { return type(FBAndroidSurfaceSwapchainCreate.XR_TYPE_ANDROID_SURFACE_SWAPCHAIN_CREATE_INFO_FB); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrAndroidSurfaceSwapchainCreateInfoFB.nnext(address(), value); return this; } - /** Sets the specified value to the {@code createFlags} field. */ - public Buffer createFlags(@NativeType("XrAndroidSurfaceSwapchainFlagsFB") long value) { XrAndroidSurfaceSwapchainCreateInfoFB.ncreateFlags(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrApiLayerProperties.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrApiLayerProperties.java deleted file mode 100644 index 0f6eca30..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrApiLayerProperties.java +++ /dev/null @@ -1,345 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.openxr.XR10.XR_MAX_API_LAYER_DESCRIPTION_SIZE; -import static org.lwjgl.openxr.XR10.XR_MAX_API_LAYER_NAME_SIZE; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrApiLayerProperties {
- *     XrStructureType type;
- *     void * next;
- *     char layerName[XR_MAX_API_LAYER_NAME_SIZE];
- *     XrVersion specVersion;
- *     uint32_t layerVersion;
- *     char description[XR_MAX_API_LAYER_DESCRIPTION_SIZE];
- * }
- */ -public class XrApiLayerProperties extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - LAYERNAME, - SPECVERSION, - LAYERVERSION, - DESCRIPTION; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __array(1, XR_MAX_API_LAYER_NAME_SIZE), - __member(8), - __member(4), - __array(1, XR_MAX_API_LAYER_DESCRIPTION_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - LAYERNAME = layout.offsetof(2); - SPECVERSION = layout.offsetof(3); - LAYERVERSION = layout.offsetof(4); - DESCRIPTION = layout.offsetof(5); - } - - /** - * Creates a {@code XrApiLayerProperties} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrApiLayerProperties(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return a {@link ByteBuffer} view of the {@code layerName} field. */ - @NativeType("char[XR_MAX_API_LAYER_NAME_SIZE]") - public ByteBuffer layerName() { return nlayerName(address()); } - /** @return the null-terminated string stored in the {@code layerName} field. */ - @NativeType("char[XR_MAX_API_LAYER_NAME_SIZE]") - public String layerNameString() { return nlayerNameString(address()); } - /** @return the value of the {@code specVersion} field. */ - @NativeType("XrVersion") - public long specVersion() { return nspecVersion(address()); } - /** @return the value of the {@code layerVersion} field. */ - @NativeType("uint32_t") - public int layerVersion() { return nlayerVersion(address()); } - /** @return a {@link ByteBuffer} view of the {@code description} field. */ - @NativeType("char[XR_MAX_API_LAYER_DESCRIPTION_SIZE]") - public ByteBuffer description() { return ndescription(address()); } - /** @return the null-terminated string stored in the {@code description} field. */ - @NativeType("char[XR_MAX_API_LAYER_DESCRIPTION_SIZE]") - public String descriptionString() { return ndescriptionString(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrApiLayerProperties type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_API_LAYER_PROPERTIES TYPE_API_LAYER_PROPERTIES} value to the {@code type} field. */ - public XrApiLayerProperties type$Default() { return type(XR10.XR_TYPE_API_LAYER_PROPERTIES); } - /** Sets the specified value to the {@code next} field. */ - public XrApiLayerProperties next(@NativeType("void *") long value) { nnext(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrApiLayerProperties set( - int type, - long next - ) { - type(type); - next(next); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrApiLayerProperties set(XrApiLayerProperties src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrApiLayerProperties} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrApiLayerProperties malloc() { - return wrap(XrApiLayerProperties.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrApiLayerProperties} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrApiLayerProperties calloc() { - return wrap(XrApiLayerProperties.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrApiLayerProperties} instance allocated with {@link BufferUtils}. */ - public static XrApiLayerProperties create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrApiLayerProperties.class, memAddress(container), container); - } - - /** Returns a new {@code XrApiLayerProperties} instance for the specified memory address. */ - public static XrApiLayerProperties create(long address) { - return wrap(XrApiLayerProperties.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrApiLayerProperties createSafe(long address) { - return address == NULL ? null : wrap(XrApiLayerProperties.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrApiLayerProperties.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrApiLayerProperties} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrApiLayerProperties malloc(MemoryStack stack) { - return wrap(XrApiLayerProperties.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrApiLayerProperties} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrApiLayerProperties calloc(MemoryStack stack) { - return wrap(XrApiLayerProperties.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrApiLayerProperties.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrApiLayerProperties.NEXT); } - /** Unsafe version of {@link #layerName}. */ - public static ByteBuffer nlayerName(long struct) { return memByteBuffer(struct + XrApiLayerProperties.LAYERNAME, XR_MAX_API_LAYER_NAME_SIZE); } - /** Unsafe version of {@link #layerNameString}. */ - public static String nlayerNameString(long struct) { return memUTF8(struct + XrApiLayerProperties.LAYERNAME); } - /** Unsafe version of {@link #specVersion}. */ - public static long nspecVersion(long struct) { return UNSAFE.getLong(null, struct + XrApiLayerProperties.SPECVERSION); } - /** Unsafe version of {@link #layerVersion}. */ - public static int nlayerVersion(long struct) { return UNSAFE.getInt(null, struct + XrApiLayerProperties.LAYERVERSION); } - /** Unsafe version of {@link #description}. */ - public static ByteBuffer ndescription(long struct) { return memByteBuffer(struct + XrApiLayerProperties.DESCRIPTION, XR_MAX_API_LAYER_DESCRIPTION_SIZE); } - /** Unsafe version of {@link #descriptionString}. */ - public static String ndescriptionString(long struct) { return memUTF8(struct + XrApiLayerProperties.DESCRIPTION); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrApiLayerProperties.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrApiLayerProperties.NEXT, value); } - - // ----------------------------------- - - /** An array of {@link XrApiLayerProperties} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrApiLayerProperties ELEMENT_FACTORY = XrApiLayerProperties.create(-1L); - - /** - * Creates a new {@code XrApiLayerProperties.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrApiLayerProperties#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrApiLayerProperties getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrApiLayerProperties.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrApiLayerProperties.nnext(address()); } - /** @return a {@link ByteBuffer} view of the {@code layerName} field. */ - @NativeType("char[XR_MAX_API_LAYER_NAME_SIZE]") - public ByteBuffer layerName() { return XrApiLayerProperties.nlayerName(address()); } - /** @return the null-terminated string stored in the {@code layerName} field. */ - @NativeType("char[XR_MAX_API_LAYER_NAME_SIZE]") - public String layerNameString() { return XrApiLayerProperties.nlayerNameString(address()); } - /** @return the value of the {@code specVersion} field. */ - @NativeType("XrVersion") - public long specVersion() { return XrApiLayerProperties.nspecVersion(address()); } - /** @return the value of the {@code layerVersion} field. */ - @NativeType("uint32_t") - public int layerVersion() { return XrApiLayerProperties.nlayerVersion(address()); } - /** @return a {@link ByteBuffer} view of the {@code description} field. */ - @NativeType("char[XR_MAX_API_LAYER_DESCRIPTION_SIZE]") - public ByteBuffer description() { return XrApiLayerProperties.ndescription(address()); } - /** @return the null-terminated string stored in the {@code description} field. */ - @NativeType("char[XR_MAX_API_LAYER_DESCRIPTION_SIZE]") - public String descriptionString() { return XrApiLayerProperties.ndescriptionString(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrApiLayerProperties.ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_API_LAYER_PROPERTIES TYPE_API_LAYER_PROPERTIES} value to the {@code type} field. */ - public Buffer type$Default() { return type(XR10.XR_TYPE_API_LAYER_PROPERTIES); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrApiLayerProperties.nnext(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrApplicationInfo.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrApplicationInfo.java deleted file mode 100644 index e121e93c..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrApplicationInfo.java +++ /dev/null @@ -1,366 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.openxr.XR10.XR_MAX_APPLICATION_NAME_SIZE; -import static org.lwjgl.openxr.XR10.XR_MAX_ENGINE_NAME_SIZE; -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrApplicationInfo {
- *     char applicationName[XR_MAX_APPLICATION_NAME_SIZE];
- *     uint32_t applicationVersion;
- *     char engineName[XR_MAX_ENGINE_NAME_SIZE];
- *     uint32_t engineVersion;
- *     XrVersion apiVersion;
- * }
- */ -public class XrApplicationInfo extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - APPLICATIONNAME, - APPLICATIONVERSION, - ENGINENAME, - ENGINEVERSION, - APIVERSION; - - static { - Layout layout = __struct( - __array(1, XR_MAX_APPLICATION_NAME_SIZE), - __member(4), - __array(1, XR_MAX_ENGINE_NAME_SIZE), - __member(4), - __member(8) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - APPLICATIONNAME = layout.offsetof(0); - APPLICATIONVERSION = layout.offsetof(1); - ENGINENAME = layout.offsetof(2); - ENGINEVERSION = layout.offsetof(3); - APIVERSION = layout.offsetof(4); - } - - /** - * Creates a {@code XrApplicationInfo} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrApplicationInfo(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return a {@link ByteBuffer} view of the {@code applicationName} field. */ - @NativeType("char[XR_MAX_APPLICATION_NAME_SIZE]") - public ByteBuffer applicationName() { return napplicationName(address()); } - /** @return the null-terminated string stored in the {@code applicationName} field. */ - @NativeType("char[XR_MAX_APPLICATION_NAME_SIZE]") - public String applicationNameString() { return napplicationNameString(address()); } - /** @return the value of the {@code applicationVersion} field. */ - @NativeType("uint32_t") - public int applicationVersion() { return napplicationVersion(address()); } - /** @return a {@link ByteBuffer} view of the {@code engineName} field. */ - @NativeType("char[XR_MAX_ENGINE_NAME_SIZE]") - public ByteBuffer engineName() { return nengineName(address()); } - /** @return the null-terminated string stored in the {@code engineName} field. */ - @NativeType("char[XR_MAX_ENGINE_NAME_SIZE]") - public String engineNameString() { return nengineNameString(address()); } - /** @return the value of the {@code engineVersion} field. */ - @NativeType("uint32_t") - public int engineVersion() { return nengineVersion(address()); } - /** @return the value of the {@code apiVersion} field. */ - @NativeType("XrVersion") - public long apiVersion() { return napiVersion(address()); } - - /** Copies the specified encoded string to the {@code applicationName} field. */ - public XrApplicationInfo applicationName(@NativeType("char[XR_MAX_APPLICATION_NAME_SIZE]") ByteBuffer value) { napplicationName(address(), value); return this; } - /** Sets the specified value to the {@code applicationVersion} field. */ - public XrApplicationInfo applicationVersion(@NativeType("uint32_t") int value) { napplicationVersion(address(), value); return this; } - /** Copies the specified encoded string to the {@code engineName} field. */ - public XrApplicationInfo engineName(@NativeType("char[XR_MAX_ENGINE_NAME_SIZE]") ByteBuffer value) { nengineName(address(), value); return this; } - /** Sets the specified value to the {@code engineVersion} field. */ - public XrApplicationInfo engineVersion(@NativeType("uint32_t") int value) { nengineVersion(address(), value); return this; } - /** Sets the specified value to the {@code apiVersion} field. */ - public XrApplicationInfo apiVersion(@NativeType("XrVersion") long value) { napiVersion(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrApplicationInfo set( - ByteBuffer applicationName, - int applicationVersion, - ByteBuffer engineName, - int engineVersion, - long apiVersion - ) { - applicationName(applicationName); - applicationVersion(applicationVersion); - engineName(engineName); - engineVersion(engineVersion); - apiVersion(apiVersion); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrApplicationInfo set(XrApplicationInfo src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrApplicationInfo} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrApplicationInfo malloc() { - return wrap(XrApplicationInfo.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrApplicationInfo} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrApplicationInfo calloc() { - return wrap(XrApplicationInfo.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrApplicationInfo} instance allocated with {@link BufferUtils}. */ - public static XrApplicationInfo create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrApplicationInfo.class, memAddress(container), container); - } - - /** Returns a new {@code XrApplicationInfo} instance for the specified memory address. */ - public static XrApplicationInfo create(long address) { - return wrap(XrApplicationInfo.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrApplicationInfo createSafe(long address) { - return address == NULL ? null : wrap(XrApplicationInfo.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrApplicationInfo.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrApplicationInfo} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrApplicationInfo malloc(MemoryStack stack) { - return wrap(XrApplicationInfo.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrApplicationInfo} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrApplicationInfo calloc(MemoryStack stack) { - return wrap(XrApplicationInfo.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #applicationName}. */ - public static ByteBuffer napplicationName(long struct) { return memByteBuffer(struct + XrApplicationInfo.APPLICATIONNAME, XR_MAX_APPLICATION_NAME_SIZE); } - /** Unsafe version of {@link #applicationNameString}. */ - public static String napplicationNameString(long struct) { return memUTF8(struct + XrApplicationInfo.APPLICATIONNAME); } - /** Unsafe version of {@link #applicationVersion}. */ - public static int napplicationVersion(long struct) { return UNSAFE.getInt(null, struct + XrApplicationInfo.APPLICATIONVERSION); } - /** Unsafe version of {@link #engineName}. */ - public static ByteBuffer nengineName(long struct) { return memByteBuffer(struct + XrApplicationInfo.ENGINENAME, XR_MAX_ENGINE_NAME_SIZE); } - /** Unsafe version of {@link #engineNameString}. */ - public static String nengineNameString(long struct) { return memUTF8(struct + XrApplicationInfo.ENGINENAME); } - /** Unsafe version of {@link #engineVersion}. */ - public static int nengineVersion(long struct) { return UNSAFE.getInt(null, struct + XrApplicationInfo.ENGINEVERSION); } - /** Unsafe version of {@link #apiVersion}. */ - public static long napiVersion(long struct) { return UNSAFE.getLong(null, struct + XrApplicationInfo.APIVERSION); } - - /** Unsafe version of {@link #applicationName(ByteBuffer) applicationName}. */ - public static void napplicationName(long struct, ByteBuffer value) { - if (CHECKS) { - checkNT1(value); - checkGT(value, XR_MAX_APPLICATION_NAME_SIZE); - } - memCopy(memAddress(value), struct + XrApplicationInfo.APPLICATIONNAME, value.remaining()); - } - /** Unsafe version of {@link #applicationVersion(int) applicationVersion}. */ - public static void napplicationVersion(long struct, int value) { UNSAFE.putInt(null, struct + XrApplicationInfo.APPLICATIONVERSION, value); } - /** Unsafe version of {@link #engineName(ByteBuffer) engineName}. */ - public static void nengineName(long struct, ByteBuffer value) { - if (CHECKS) { - checkNT1(value); - checkGT(value, XR_MAX_ENGINE_NAME_SIZE); - } - memCopy(memAddress(value), struct + XrApplicationInfo.ENGINENAME, value.remaining()); - } - /** Unsafe version of {@link #engineVersion(int) engineVersion}. */ - public static void nengineVersion(long struct, int value) { UNSAFE.putInt(null, struct + XrApplicationInfo.ENGINEVERSION, value); } - /** Unsafe version of {@link #apiVersion(long) apiVersion}. */ - public static void napiVersion(long struct, long value) { UNSAFE.putLong(null, struct + XrApplicationInfo.APIVERSION, value); } - - // ----------------------------------- - - /** An array of {@link XrApplicationInfo} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrApplicationInfo ELEMENT_FACTORY = XrApplicationInfo.create(-1L); - - /** - * Creates a new {@code XrApplicationInfo.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrApplicationInfo#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrApplicationInfo getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link ByteBuffer} view of the {@code applicationName} field. */ - @NativeType("char[XR_MAX_APPLICATION_NAME_SIZE]") - public ByteBuffer applicationName() { return XrApplicationInfo.napplicationName(address()); } - /** @return the null-terminated string stored in the {@code applicationName} field. */ - @NativeType("char[XR_MAX_APPLICATION_NAME_SIZE]") - public String applicationNameString() { return XrApplicationInfo.napplicationNameString(address()); } - /** @return the value of the {@code applicationVersion} field. */ - @NativeType("uint32_t") - public int applicationVersion() { return XrApplicationInfo.napplicationVersion(address()); } - /** @return a {@link ByteBuffer} view of the {@code engineName} field. */ - @NativeType("char[XR_MAX_ENGINE_NAME_SIZE]") - public ByteBuffer engineName() { return XrApplicationInfo.nengineName(address()); } - /** @return the null-terminated string stored in the {@code engineName} field. */ - @NativeType("char[XR_MAX_ENGINE_NAME_SIZE]") - public String engineNameString() { return XrApplicationInfo.nengineNameString(address()); } - /** @return the value of the {@code engineVersion} field. */ - @NativeType("uint32_t") - public int engineVersion() { return XrApplicationInfo.nengineVersion(address()); } - /** @return the value of the {@code apiVersion} field. */ - @NativeType("XrVersion") - public long apiVersion() { return XrApplicationInfo.napiVersion(address()); } - - /** Copies the specified encoded string to the {@code applicationName} field. */ - public Buffer applicationName(@NativeType("char[XR_MAX_APPLICATION_NAME_SIZE]") ByteBuffer value) { XrApplicationInfo.napplicationName(address(), value); return this; } - /** Sets the specified value to the {@code applicationVersion} field. */ - public Buffer applicationVersion(@NativeType("uint32_t") int value) { XrApplicationInfo.napplicationVersion(address(), value); return this; } - /** Copies the specified encoded string to the {@code engineName} field. */ - public Buffer engineName(@NativeType("char[XR_MAX_ENGINE_NAME_SIZE]") ByteBuffer value) { XrApplicationInfo.nengineName(address(), value); return this; } - /** Sets the specified value to the {@code engineVersion} field. */ - public Buffer engineVersion(@NativeType("uint32_t") int value) { XrApplicationInfo.nengineVersion(address(), value); return this; } - /** Sets the specified value to the {@code apiVersion} field. */ - public Buffer apiVersion(@NativeType("XrVersion") long value) { XrApplicationInfo.napiVersion(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrBaseInStructure.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrBaseInStructure.java deleted file mode 100644 index 463631ba..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrBaseInStructure.java +++ /dev/null @@ -1,277 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrBaseInStructure {
- *     XrStructureType type;
- *     {@link XrBaseInStructure XrBaseInStructure} * next;
- * }
- */ -public class XrBaseInStructure extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - } - - /** - * Creates a {@code XrBaseInStructure} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrBaseInStructure(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return a {@link XrBaseInStructure} view of the struct pointed to by the {@code next} field. */ - @Nullable - @NativeType("XrBaseInStructure *") - public XrBaseInStructure next() { return nnext(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrBaseInStructure type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the address of the specified {@link XrBaseInStructure} to the {@code next} field. */ - public XrBaseInStructure next(@Nullable @NativeType("XrBaseInStructure *") XrBaseInStructure value) { nnext(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrBaseInStructure set( - int type, - @Nullable XrBaseInStructure next - ) { - type(type); - next(next); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrBaseInStructure set(XrBaseInStructure src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrBaseInStructure} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrBaseInStructure malloc() { - return wrap(XrBaseInStructure.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrBaseInStructure} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrBaseInStructure calloc() { - return wrap(XrBaseInStructure.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrBaseInStructure} instance allocated with {@link BufferUtils}. */ - public static XrBaseInStructure create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrBaseInStructure.class, memAddress(container), container); - } - - /** Returns a new {@code XrBaseInStructure} instance for the specified memory address. */ - public static XrBaseInStructure create(long address) { - return wrap(XrBaseInStructure.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrBaseInStructure createSafe(long address) { - return address == NULL ? null : wrap(XrBaseInStructure.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrBaseInStructure.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrBaseInStructure} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrBaseInStructure malloc(MemoryStack stack) { - return wrap(XrBaseInStructure.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrBaseInStructure} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrBaseInStructure calloc(MemoryStack stack) { - return wrap(XrBaseInStructure.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrBaseInStructure.TYPE); } - /** Unsafe version of {@link #next}. */ - @Nullable public static XrBaseInStructure nnext(long struct) { return XrBaseInStructure.createSafe(memGetAddress(struct + XrBaseInStructure.NEXT)); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrBaseInStructure.TYPE, value); } - /** Unsafe version of {@link #next(XrBaseInStructure) next}. */ - public static void nnext(long struct, @Nullable XrBaseInStructure value) { memPutAddress(struct + XrBaseInStructure.NEXT, memAddressSafe(value)); } - - // ----------------------------------- - - /** An array of {@link XrBaseInStructure} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrBaseInStructure ELEMENT_FACTORY = XrBaseInStructure.create(-1L); - - /** - * Creates a new {@code XrBaseInStructure.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrBaseInStructure#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrBaseInStructure getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrBaseInStructure.ntype(address()); } - /** @return a {@link XrBaseInStructure} view of the struct pointed to by the {@code next} field. */ - @Nullable - @NativeType("XrBaseInStructure *") - public XrBaseInStructure next() { return XrBaseInStructure.nnext(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrBaseInStructure.ntype(address(), value); return this; } - /** Sets the address of the specified {@link XrBaseInStructure} to the {@code next} field. */ - public Buffer next(@Nullable @NativeType("XrBaseInStructure *") XrBaseInStructure value) { XrBaseInStructure.nnext(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrBaseOutStructure.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrBaseOutStructure.java deleted file mode 100644 index 27190015..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrBaseOutStructure.java +++ /dev/null @@ -1,277 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrBaseOutStructure {
- *     XrStructureType type;
- *     {@link XrBaseOutStructure XrBaseOutStructure} * next;
- * }
- */ -public class XrBaseOutStructure extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - } - - /** - * Creates a {@code XrBaseOutStructure} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrBaseOutStructure(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return a {@link XrBaseOutStructure} view of the struct pointed to by the {@code next} field. */ - @Nullable - @NativeType("XrBaseOutStructure *") - public XrBaseOutStructure next() { return nnext(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrBaseOutStructure type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the address of the specified {@link XrBaseOutStructure} to the {@code next} field. */ - public XrBaseOutStructure next(@Nullable @NativeType("XrBaseOutStructure *") XrBaseOutStructure value) { nnext(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrBaseOutStructure set( - int type, - @Nullable XrBaseOutStructure next - ) { - type(type); - next(next); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrBaseOutStructure set(XrBaseOutStructure src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrBaseOutStructure} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrBaseOutStructure malloc() { - return wrap(XrBaseOutStructure.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrBaseOutStructure} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrBaseOutStructure calloc() { - return wrap(XrBaseOutStructure.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrBaseOutStructure} instance allocated with {@link BufferUtils}. */ - public static XrBaseOutStructure create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrBaseOutStructure.class, memAddress(container), container); - } - - /** Returns a new {@code XrBaseOutStructure} instance for the specified memory address. */ - public static XrBaseOutStructure create(long address) { - return wrap(XrBaseOutStructure.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrBaseOutStructure createSafe(long address) { - return address == NULL ? null : wrap(XrBaseOutStructure.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrBaseOutStructure.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrBaseOutStructure} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrBaseOutStructure malloc(MemoryStack stack) { - return wrap(XrBaseOutStructure.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrBaseOutStructure} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrBaseOutStructure calloc(MemoryStack stack) { - return wrap(XrBaseOutStructure.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrBaseOutStructure.TYPE); } - /** Unsafe version of {@link #next}. */ - @Nullable public static XrBaseOutStructure nnext(long struct) { return XrBaseOutStructure.createSafe(memGetAddress(struct + XrBaseOutStructure.NEXT)); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrBaseOutStructure.TYPE, value); } - /** Unsafe version of {@link #next(XrBaseOutStructure) next}. */ - public static void nnext(long struct, @Nullable XrBaseOutStructure value) { memPutAddress(struct + XrBaseOutStructure.NEXT, memAddressSafe(value)); } - - // ----------------------------------- - - /** An array of {@link XrBaseOutStructure} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrBaseOutStructure ELEMENT_FACTORY = XrBaseOutStructure.create(-1L); - - /** - * Creates a new {@code XrBaseOutStructure.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrBaseOutStructure#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrBaseOutStructure getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrBaseOutStructure.ntype(address()); } - /** @return a {@link XrBaseOutStructure} view of the struct pointed to by the {@code next} field. */ - @Nullable - @NativeType("XrBaseOutStructure *") - public XrBaseOutStructure next() { return XrBaseOutStructure.nnext(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrBaseOutStructure.ntype(address(), value); return this; } - /** Sets the address of the specified {@link XrBaseOutStructure} to the {@code next} field. */ - public Buffer next(@Nullable @NativeType("XrBaseOutStructure *") XrBaseOutStructure value) { XrBaseOutStructure.nnext(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrBindingModificationBaseHeaderKHR.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrBindingModificationBaseHeaderKHR.java deleted file mode 100644 index 409ab793..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrBindingModificationBaseHeaderKHR.java +++ /dev/null @@ -1,275 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrBindingModificationBaseHeaderKHR {
- *     XrStructureType type;
- *     void const * next;
- * }
- */ -public class XrBindingModificationBaseHeaderKHR extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - } - - /** - * Creates a {@code XrBindingModificationBaseHeaderKHR} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrBindingModificationBaseHeaderKHR(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrBindingModificationBaseHeaderKHR type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the specified value to the {@code next} field. */ - public XrBindingModificationBaseHeaderKHR next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrBindingModificationBaseHeaderKHR set( - int type, - long next - ) { - type(type); - next(next); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrBindingModificationBaseHeaderKHR set(XrBindingModificationBaseHeaderKHR src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrBindingModificationBaseHeaderKHR} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrBindingModificationBaseHeaderKHR malloc() { - return wrap(XrBindingModificationBaseHeaderKHR.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrBindingModificationBaseHeaderKHR} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrBindingModificationBaseHeaderKHR calloc() { - return wrap(XrBindingModificationBaseHeaderKHR.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrBindingModificationBaseHeaderKHR} instance allocated with {@link BufferUtils}. */ - public static XrBindingModificationBaseHeaderKHR create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrBindingModificationBaseHeaderKHR.class, memAddress(container), container); - } - - /** Returns a new {@code XrBindingModificationBaseHeaderKHR} instance for the specified memory address. */ - public static XrBindingModificationBaseHeaderKHR create(long address) { - return wrap(XrBindingModificationBaseHeaderKHR.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrBindingModificationBaseHeaderKHR createSafe(long address) { - return address == NULL ? null : wrap(XrBindingModificationBaseHeaderKHR.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrBindingModificationBaseHeaderKHR.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrBindingModificationBaseHeaderKHR} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrBindingModificationBaseHeaderKHR malloc(MemoryStack stack) { - return wrap(XrBindingModificationBaseHeaderKHR.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrBindingModificationBaseHeaderKHR} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrBindingModificationBaseHeaderKHR calloc(MemoryStack stack) { - return wrap(XrBindingModificationBaseHeaderKHR.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrBindingModificationBaseHeaderKHR.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrBindingModificationBaseHeaderKHR.NEXT); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrBindingModificationBaseHeaderKHR.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrBindingModificationBaseHeaderKHR.NEXT, value); } - - // ----------------------------------- - - /** An array of {@link XrBindingModificationBaseHeaderKHR} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrBindingModificationBaseHeaderKHR ELEMENT_FACTORY = XrBindingModificationBaseHeaderKHR.create(-1L); - - /** - * Creates a new {@code XrBindingModificationBaseHeaderKHR.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrBindingModificationBaseHeaderKHR#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrBindingModificationBaseHeaderKHR getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrBindingModificationBaseHeaderKHR.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrBindingModificationBaseHeaderKHR.nnext(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrBindingModificationBaseHeaderKHR.ntype(address(), value); return this; } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrBindingModificationBaseHeaderKHR.nnext(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrBindingModificationsKHR.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrBindingModificationsKHR.java deleted file mode 100644 index a00e2a19..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrBindingModificationsKHR.java +++ /dev/null @@ -1,322 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.PointerBuffer; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrBindingModificationsKHR {
- *     XrStructureType type;
- *     void const * next;
- *     uint32_t bindingModificationCount;
- *     {@link XrBindingModificationBaseHeaderKHR XrBindingModificationBaseHeaderKHR} const * const * bindingModifications;
- * }
- */ -public class XrBindingModificationsKHR extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - BINDINGMODIFICATIONCOUNT, - BINDINGMODIFICATIONS; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - BINDINGMODIFICATIONCOUNT = layout.offsetof(2); - BINDINGMODIFICATIONS = layout.offsetof(3); - } - - /** - * Creates a {@code XrBindingModificationsKHR} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrBindingModificationsKHR(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code bindingModificationCount} field. */ - @NativeType("uint32_t") - public int bindingModificationCount() { return nbindingModificationCount(address()); } - /** @return a {@link PointerBuffer} view of the data pointed to by the {@code bindingModifications} field. */ - @Nullable - @NativeType("XrBindingModificationBaseHeaderKHR const * const *") - public PointerBuffer bindingModifications() { return nbindingModifications(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrBindingModificationsKHR type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link KHRBindingModification#XR_TYPE_BINDING_MODIFICATIONS_KHR TYPE_BINDING_MODIFICATIONS_KHR} value to the {@code type} field. */ - public XrBindingModificationsKHR type$Default() { return type(KHRBindingModification.XR_TYPE_BINDING_MODIFICATIONS_KHR); } - /** Sets the specified value to the {@code next} field. */ - public XrBindingModificationsKHR next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code bindingModificationCount} field. */ - public XrBindingModificationsKHR bindingModificationCount(@NativeType("uint32_t") int value) { nbindingModificationCount(address(), value); return this; } - /** Sets the address of the specified {@link PointerBuffer} to the {@code bindingModifications} field. */ - public XrBindingModificationsKHR bindingModifications(@Nullable @NativeType("XrBindingModificationBaseHeaderKHR const * const *") PointerBuffer value) { nbindingModifications(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrBindingModificationsKHR set( - int type, - long next, - int bindingModificationCount, - @Nullable PointerBuffer bindingModifications - ) { - type(type); - next(next); - bindingModificationCount(bindingModificationCount); - bindingModifications(bindingModifications); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrBindingModificationsKHR set(XrBindingModificationsKHR src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrBindingModificationsKHR} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrBindingModificationsKHR malloc() { - return wrap(XrBindingModificationsKHR.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrBindingModificationsKHR} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrBindingModificationsKHR calloc() { - return wrap(XrBindingModificationsKHR.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrBindingModificationsKHR} instance allocated with {@link BufferUtils}. */ - public static XrBindingModificationsKHR create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrBindingModificationsKHR.class, memAddress(container), container); - } - - /** Returns a new {@code XrBindingModificationsKHR} instance for the specified memory address. */ - public static XrBindingModificationsKHR create(long address) { - return wrap(XrBindingModificationsKHR.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrBindingModificationsKHR createSafe(long address) { - return address == NULL ? null : wrap(XrBindingModificationsKHR.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrBindingModificationsKHR.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrBindingModificationsKHR} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrBindingModificationsKHR malloc(MemoryStack stack) { - return wrap(XrBindingModificationsKHR.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrBindingModificationsKHR} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrBindingModificationsKHR calloc(MemoryStack stack) { - return wrap(XrBindingModificationsKHR.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrBindingModificationsKHR.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrBindingModificationsKHR.NEXT); } - /** Unsafe version of {@link #bindingModificationCount}. */ - public static int nbindingModificationCount(long struct) { return UNSAFE.getInt(null, struct + XrBindingModificationsKHR.BINDINGMODIFICATIONCOUNT); } - /** Unsafe version of {@link #bindingModifications() bindingModifications}. */ - @Nullable public static PointerBuffer nbindingModifications(long struct) { return memPointerBufferSafe(memGetAddress(struct + XrBindingModificationsKHR.BINDINGMODIFICATIONS), nbindingModificationCount(struct)); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrBindingModificationsKHR.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrBindingModificationsKHR.NEXT, value); } - /** Sets the specified value to the {@code bindingModificationCount} field of the specified {@code struct}. */ - public static void nbindingModificationCount(long struct, int value) { UNSAFE.putInt(null, struct + XrBindingModificationsKHR.BINDINGMODIFICATIONCOUNT, value); } - /** Unsafe version of {@link #bindingModifications(PointerBuffer) bindingModifications}. */ - public static void nbindingModifications(long struct, @Nullable PointerBuffer value) { memPutAddress(struct + XrBindingModificationsKHR.BINDINGMODIFICATIONS, memAddressSafe(value)); if (value != null) { nbindingModificationCount(struct, value.remaining()); } } - - // ----------------------------------- - - /** An array of {@link XrBindingModificationsKHR} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrBindingModificationsKHR ELEMENT_FACTORY = XrBindingModificationsKHR.create(-1L); - - /** - * Creates a new {@code XrBindingModificationsKHR.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrBindingModificationsKHR#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrBindingModificationsKHR getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrBindingModificationsKHR.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrBindingModificationsKHR.nnext(address()); } - /** @return the value of the {@code bindingModificationCount} field. */ - @NativeType("uint32_t") - public int bindingModificationCount() { return XrBindingModificationsKHR.nbindingModificationCount(address()); } - /** @return a {@link PointerBuffer} view of the data pointed to by the {@code bindingModifications} field. */ - @Nullable - @NativeType("XrBindingModificationBaseHeaderKHR const * const *") - public PointerBuffer bindingModifications() { return XrBindingModificationsKHR.nbindingModifications(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrBindingModificationsKHR.ntype(address(), value); return this; } - /** Sets the {@link KHRBindingModification#XR_TYPE_BINDING_MODIFICATIONS_KHR TYPE_BINDING_MODIFICATIONS_KHR} value to the {@code type} field. */ - public Buffer type$Default() { return type(KHRBindingModification.XR_TYPE_BINDING_MODIFICATIONS_KHR); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrBindingModificationsKHR.nnext(address(), value); return this; } - /** Sets the specified value to the {@code bindingModificationCount} field. */ - public Buffer bindingModificationCount(@NativeType("uint32_t") int value) { XrBindingModificationsKHR.nbindingModificationCount(address(), value); return this; } - /** Sets the address of the specified {@link PointerBuffer} to the {@code bindingModifications} field. */ - public Buffer bindingModifications(@Nullable @NativeType("XrBindingModificationBaseHeaderKHR const * const *") PointerBuffer value) { XrBindingModificationsKHR.nbindingModifications(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrBoundSourcesForActionEnumerateInfo.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrBoundSourcesForActionEnumerateInfo.java deleted file mode 100644 index 42912772..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrBoundSourcesForActionEnumerateInfo.java +++ /dev/null @@ -1,321 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrBoundSourcesForActionEnumerateInfo {
- *     XrStructureType type;
- *     void const * next;
- *     XrAction action;
- * }
- */ -public class XrBoundSourcesForActionEnumerateInfo extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - ACTION; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - ACTION = layout.offsetof(2); - } - - /** - * Creates a {@code XrBoundSourcesForActionEnumerateInfo} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrBoundSourcesForActionEnumerateInfo(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code action} field. */ - @NativeType("XrAction") - public long action() { return naction(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrBoundSourcesForActionEnumerateInfo type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_BOUND_SOURCES_FOR_ACTION_ENUMERATE_INFO TYPE_BOUND_SOURCES_FOR_ACTION_ENUMERATE_INFO} value to the {@code type} field. */ - public XrBoundSourcesForActionEnumerateInfo type$Default() { return type(XR10.XR_TYPE_BOUND_SOURCES_FOR_ACTION_ENUMERATE_INFO); } - /** Sets the specified value to the {@code next} field. */ - public XrBoundSourcesForActionEnumerateInfo next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code action} field. */ - public XrBoundSourcesForActionEnumerateInfo action(XrAction value) { naction(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrBoundSourcesForActionEnumerateInfo set( - int type, - long next, - XrAction action - ) { - type(type); - next(next); - action(action); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrBoundSourcesForActionEnumerateInfo set(XrBoundSourcesForActionEnumerateInfo src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrBoundSourcesForActionEnumerateInfo} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrBoundSourcesForActionEnumerateInfo malloc() { - return wrap(XrBoundSourcesForActionEnumerateInfo.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrBoundSourcesForActionEnumerateInfo} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrBoundSourcesForActionEnumerateInfo calloc() { - return wrap(XrBoundSourcesForActionEnumerateInfo.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrBoundSourcesForActionEnumerateInfo} instance allocated with {@link BufferUtils}. */ - public static XrBoundSourcesForActionEnumerateInfo create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrBoundSourcesForActionEnumerateInfo.class, memAddress(container), container); - } - - /** Returns a new {@code XrBoundSourcesForActionEnumerateInfo} instance for the specified memory address. */ - public static XrBoundSourcesForActionEnumerateInfo create(long address) { - return wrap(XrBoundSourcesForActionEnumerateInfo.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrBoundSourcesForActionEnumerateInfo createSafe(long address) { - return address == NULL ? null : wrap(XrBoundSourcesForActionEnumerateInfo.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrBoundSourcesForActionEnumerateInfo.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrBoundSourcesForActionEnumerateInfo} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrBoundSourcesForActionEnumerateInfo malloc(MemoryStack stack) { - return wrap(XrBoundSourcesForActionEnumerateInfo.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrBoundSourcesForActionEnumerateInfo} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrBoundSourcesForActionEnumerateInfo calloc(MemoryStack stack) { - return wrap(XrBoundSourcesForActionEnumerateInfo.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrBoundSourcesForActionEnumerateInfo.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrBoundSourcesForActionEnumerateInfo.NEXT); } - /** Unsafe version of {@link #action}. */ - public static long naction(long struct) { return memGetAddress(struct + XrBoundSourcesForActionEnumerateInfo.ACTION); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrBoundSourcesForActionEnumerateInfo.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrBoundSourcesForActionEnumerateInfo.NEXT, value); } - /** Unsafe version of {@link #action(XrAction) action}. */ - public static void naction(long struct, XrAction value) { memPutAddress(struct + XrBoundSourcesForActionEnumerateInfo.ACTION, value.address()); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XrBoundSourcesForActionEnumerateInfo.ACTION)); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrBoundSourcesForActionEnumerateInfo} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrBoundSourcesForActionEnumerateInfo ELEMENT_FACTORY = XrBoundSourcesForActionEnumerateInfo.create(-1L); - - /** - * Creates a new {@code XrBoundSourcesForActionEnumerateInfo.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrBoundSourcesForActionEnumerateInfo#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrBoundSourcesForActionEnumerateInfo getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrBoundSourcesForActionEnumerateInfo.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrBoundSourcesForActionEnumerateInfo.nnext(address()); } - /** @return the value of the {@code action} field. */ - @NativeType("XrAction") - public long action() { return XrBoundSourcesForActionEnumerateInfo.naction(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrBoundSourcesForActionEnumerateInfo.ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_BOUND_SOURCES_FOR_ACTION_ENUMERATE_INFO TYPE_BOUND_SOURCES_FOR_ACTION_ENUMERATE_INFO} value to the {@code type} field. */ - public Buffer type$Default() { return type(XR10.XR_TYPE_BOUND_SOURCES_FOR_ACTION_ENUMERATE_INFO); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrBoundSourcesForActionEnumerateInfo.nnext(address(), value); return this; } - /** Sets the specified value to the {@code action} field. */ - public Buffer action(XrAction value) { XrBoundSourcesForActionEnumerateInfo.naction(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrColor4f.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrColor4f.java deleted file mode 100644 index 901ee333..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrColor4f.java +++ /dev/null @@ -1,307 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrColor4f {
- *     float r;
- *     float g;
- *     float b;
- *     float a;
- * }
- */ -public class XrColor4f extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - R, - G, - B, - A; - - static { - Layout layout = __struct( - __member(4), - __member(4), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - R = layout.offsetof(0); - G = layout.offsetof(1); - B = layout.offsetof(2); - A = layout.offsetof(3); - } - - /** - * Creates a {@code XrColor4f} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrColor4f(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code r} field. */ - public float r() { return nr(address()); } - /** @return the value of the {@code g} field. */ - public float g() { return ng(address()); } - /** @return the value of the {@code b} field. */ - public float b() { return nb(address()); } - /** @return the value of the {@code a} field. */ - public float a() { return na(address()); } - - /** Sets the specified value to the {@code r} field. */ - public XrColor4f r(float value) { nr(address(), value); return this; } - /** Sets the specified value to the {@code g} field. */ - public XrColor4f g(float value) { ng(address(), value); return this; } - /** Sets the specified value to the {@code b} field. */ - public XrColor4f b(float value) { nb(address(), value); return this; } - /** Sets the specified value to the {@code a} field. */ - public XrColor4f a(float value) { na(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrColor4f set( - float r, - float g, - float b, - float a - ) { - r(r); - g(g); - b(b); - a(a); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrColor4f set(XrColor4f src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrColor4f} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrColor4f malloc() { - return wrap(XrColor4f.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrColor4f} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrColor4f calloc() { - return wrap(XrColor4f.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrColor4f} instance allocated with {@link BufferUtils}. */ - public static XrColor4f create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrColor4f.class, memAddress(container), container); - } - - /** Returns a new {@code XrColor4f} instance for the specified memory address. */ - public static XrColor4f create(long address) { - return wrap(XrColor4f.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrColor4f createSafe(long address) { - return address == NULL ? null : wrap(XrColor4f.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrColor4f.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrColor4f} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrColor4f malloc(MemoryStack stack) { - return wrap(XrColor4f.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrColor4f} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrColor4f calloc(MemoryStack stack) { - return wrap(XrColor4f.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #r}. */ - public static float nr(long struct) { return UNSAFE.getFloat(null, struct + XrColor4f.R); } - /** Unsafe version of {@link #g}. */ - public static float ng(long struct) { return UNSAFE.getFloat(null, struct + XrColor4f.G); } - /** Unsafe version of {@link #b}. */ - public static float nb(long struct) { return UNSAFE.getFloat(null, struct + XrColor4f.B); } - /** Unsafe version of {@link #a}. */ - public static float na(long struct) { return UNSAFE.getFloat(null, struct + XrColor4f.A); } - - /** Unsafe version of {@link #r(float) r}. */ - public static void nr(long struct, float value) { UNSAFE.putFloat(null, struct + XrColor4f.R, value); } - /** Unsafe version of {@link #g(float) g}. */ - public static void ng(long struct, float value) { UNSAFE.putFloat(null, struct + XrColor4f.G, value); } - /** Unsafe version of {@link #b(float) b}. */ - public static void nb(long struct, float value) { UNSAFE.putFloat(null, struct + XrColor4f.B, value); } - /** Unsafe version of {@link #a(float) a}. */ - public static void na(long struct, float value) { UNSAFE.putFloat(null, struct + XrColor4f.A, value); } - - // ----------------------------------- - - /** An array of {@link XrColor4f} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrColor4f ELEMENT_FACTORY = XrColor4f.create(-1L); - - /** - * Creates a new {@code XrColor4f.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrColor4f#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrColor4f getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code r} field. */ - public float r() { return XrColor4f.nr(address()); } - /** @return the value of the {@code g} field. */ - public float g() { return XrColor4f.ng(address()); } - /** @return the value of the {@code b} field. */ - public float b() { return XrColor4f.nb(address()); } - /** @return the value of the {@code a} field. */ - public float a() { return XrColor4f.na(address()); } - - /** Sets the specified value to the {@code r} field. */ - public Buffer r(float value) { XrColor4f.nr(address(), value); return this; } - /** Sets the specified value to the {@code g} field. */ - public Buffer g(float value) { XrColor4f.ng(address(), value); return this; } - /** Sets the specified value to the {@code b} field. */ - public Buffer b(float value) { XrColor4f.nb(address(), value); return this; } - /** Sets the specified value to the {@code a} field. */ - public Buffer a(float value) { XrColor4f.na(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrCompositionLayerAlphaBlendFB.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrCompositionLayerAlphaBlendFB.java deleted file mode 100644 index be5d963b..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrCompositionLayerAlphaBlendFB.java +++ /dev/null @@ -1,359 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrCompositionLayerAlphaBlendFB {
- *     XrStructureType type;
- *     void * next;
- *     XrBlendFactorFB srcFactorColor;
- *     XrBlendFactorFB dstFactorColor;
- *     XrBlendFactorFB srcFactorAlpha;
- *     XrBlendFactorFB dstFactorAlpha;
- * }
- */ -public class XrCompositionLayerAlphaBlendFB extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - SRCFACTORCOLOR, - DSTFACTORCOLOR, - SRCFACTORALPHA, - DSTFACTORALPHA; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(4), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - SRCFACTORCOLOR = layout.offsetof(2); - DSTFACTORCOLOR = layout.offsetof(3); - SRCFACTORALPHA = layout.offsetof(4); - DSTFACTORALPHA = layout.offsetof(5); - } - - /** - * Creates a {@code XrCompositionLayerAlphaBlendFB} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrCompositionLayerAlphaBlendFB(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return the value of the {@code srcFactorColor} field. */ - @NativeType("XrBlendFactorFB") - public int srcFactorColor() { return nsrcFactorColor(address()); } - /** @return the value of the {@code dstFactorColor} field. */ - @NativeType("XrBlendFactorFB") - public int dstFactorColor() { return ndstFactorColor(address()); } - /** @return the value of the {@code srcFactorAlpha} field. */ - @NativeType("XrBlendFactorFB") - public int srcFactorAlpha() { return nsrcFactorAlpha(address()); } - /** @return the value of the {@code dstFactorAlpha} field. */ - @NativeType("XrBlendFactorFB") - public int dstFactorAlpha() { return ndstFactorAlpha(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrCompositionLayerAlphaBlendFB type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link FBCompositionLayerAlphaBlend#XR_TYPE_COMPOSITION_LAYER_ALPHA_BLEND_FB TYPE_COMPOSITION_LAYER_ALPHA_BLEND_FB} value to the {@code type} field. */ - public XrCompositionLayerAlphaBlendFB type$Default() { return type(FBCompositionLayerAlphaBlend.XR_TYPE_COMPOSITION_LAYER_ALPHA_BLEND_FB); } - /** Sets the specified value to the {@code next} field. */ - public XrCompositionLayerAlphaBlendFB next(@NativeType("void *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code srcFactorColor} field. */ - public XrCompositionLayerAlphaBlendFB srcFactorColor(@NativeType("XrBlendFactorFB") int value) { nsrcFactorColor(address(), value); return this; } - /** Sets the specified value to the {@code dstFactorColor} field. */ - public XrCompositionLayerAlphaBlendFB dstFactorColor(@NativeType("XrBlendFactorFB") int value) { ndstFactorColor(address(), value); return this; } - /** Sets the specified value to the {@code srcFactorAlpha} field. */ - public XrCompositionLayerAlphaBlendFB srcFactorAlpha(@NativeType("XrBlendFactorFB") int value) { nsrcFactorAlpha(address(), value); return this; } - /** Sets the specified value to the {@code dstFactorAlpha} field. */ - public XrCompositionLayerAlphaBlendFB dstFactorAlpha(@NativeType("XrBlendFactorFB") int value) { ndstFactorAlpha(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrCompositionLayerAlphaBlendFB set( - int type, - long next, - int srcFactorColor, - int dstFactorColor, - int srcFactorAlpha, - int dstFactorAlpha - ) { - type(type); - next(next); - srcFactorColor(srcFactorColor); - dstFactorColor(dstFactorColor); - srcFactorAlpha(srcFactorAlpha); - dstFactorAlpha(dstFactorAlpha); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrCompositionLayerAlphaBlendFB set(XrCompositionLayerAlphaBlendFB src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrCompositionLayerAlphaBlendFB} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrCompositionLayerAlphaBlendFB malloc() { - return wrap(XrCompositionLayerAlphaBlendFB.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrCompositionLayerAlphaBlendFB} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrCompositionLayerAlphaBlendFB calloc() { - return wrap(XrCompositionLayerAlphaBlendFB.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrCompositionLayerAlphaBlendFB} instance allocated with {@link BufferUtils}. */ - public static XrCompositionLayerAlphaBlendFB create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrCompositionLayerAlphaBlendFB.class, memAddress(container), container); - } - - /** Returns a new {@code XrCompositionLayerAlphaBlendFB} instance for the specified memory address. */ - public static XrCompositionLayerAlphaBlendFB create(long address) { - return wrap(XrCompositionLayerAlphaBlendFB.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrCompositionLayerAlphaBlendFB createSafe(long address) { - return address == NULL ? null : wrap(XrCompositionLayerAlphaBlendFB.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrCompositionLayerAlphaBlendFB.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrCompositionLayerAlphaBlendFB} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrCompositionLayerAlphaBlendFB malloc(MemoryStack stack) { - return wrap(XrCompositionLayerAlphaBlendFB.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrCompositionLayerAlphaBlendFB} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrCompositionLayerAlphaBlendFB calloc(MemoryStack stack) { - return wrap(XrCompositionLayerAlphaBlendFB.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrCompositionLayerAlphaBlendFB.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrCompositionLayerAlphaBlendFB.NEXT); } - /** Unsafe version of {@link #srcFactorColor}. */ - public static int nsrcFactorColor(long struct) { return UNSAFE.getInt(null, struct + XrCompositionLayerAlphaBlendFB.SRCFACTORCOLOR); } - /** Unsafe version of {@link #dstFactorColor}. */ - public static int ndstFactorColor(long struct) { return UNSAFE.getInt(null, struct + XrCompositionLayerAlphaBlendFB.DSTFACTORCOLOR); } - /** Unsafe version of {@link #srcFactorAlpha}. */ - public static int nsrcFactorAlpha(long struct) { return UNSAFE.getInt(null, struct + XrCompositionLayerAlphaBlendFB.SRCFACTORALPHA); } - /** Unsafe version of {@link #dstFactorAlpha}. */ - public static int ndstFactorAlpha(long struct) { return UNSAFE.getInt(null, struct + XrCompositionLayerAlphaBlendFB.DSTFACTORALPHA); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrCompositionLayerAlphaBlendFB.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrCompositionLayerAlphaBlendFB.NEXT, value); } - /** Unsafe version of {@link #srcFactorColor(int) srcFactorColor}. */ - public static void nsrcFactorColor(long struct, int value) { UNSAFE.putInt(null, struct + XrCompositionLayerAlphaBlendFB.SRCFACTORCOLOR, value); } - /** Unsafe version of {@link #dstFactorColor(int) dstFactorColor}. */ - public static void ndstFactorColor(long struct, int value) { UNSAFE.putInt(null, struct + XrCompositionLayerAlphaBlendFB.DSTFACTORCOLOR, value); } - /** Unsafe version of {@link #srcFactorAlpha(int) srcFactorAlpha}. */ - public static void nsrcFactorAlpha(long struct, int value) { UNSAFE.putInt(null, struct + XrCompositionLayerAlphaBlendFB.SRCFACTORALPHA, value); } - /** Unsafe version of {@link #dstFactorAlpha(int) dstFactorAlpha}. */ - public static void ndstFactorAlpha(long struct, int value) { UNSAFE.putInt(null, struct + XrCompositionLayerAlphaBlendFB.DSTFACTORALPHA, value); } - - // ----------------------------------- - - /** An array of {@link XrCompositionLayerAlphaBlendFB} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrCompositionLayerAlphaBlendFB ELEMENT_FACTORY = XrCompositionLayerAlphaBlendFB.create(-1L); - - /** - * Creates a new {@code XrCompositionLayerAlphaBlendFB.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrCompositionLayerAlphaBlendFB#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrCompositionLayerAlphaBlendFB getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrCompositionLayerAlphaBlendFB.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrCompositionLayerAlphaBlendFB.nnext(address()); } - /** @return the value of the {@code srcFactorColor} field. */ - @NativeType("XrBlendFactorFB") - public int srcFactorColor() { return XrCompositionLayerAlphaBlendFB.nsrcFactorColor(address()); } - /** @return the value of the {@code dstFactorColor} field. */ - @NativeType("XrBlendFactorFB") - public int dstFactorColor() { return XrCompositionLayerAlphaBlendFB.ndstFactorColor(address()); } - /** @return the value of the {@code srcFactorAlpha} field. */ - @NativeType("XrBlendFactorFB") - public int srcFactorAlpha() { return XrCompositionLayerAlphaBlendFB.nsrcFactorAlpha(address()); } - /** @return the value of the {@code dstFactorAlpha} field. */ - @NativeType("XrBlendFactorFB") - public int dstFactorAlpha() { return XrCompositionLayerAlphaBlendFB.ndstFactorAlpha(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrCompositionLayerAlphaBlendFB.ntype(address(), value); return this; } - /** Sets the {@link FBCompositionLayerAlphaBlend#XR_TYPE_COMPOSITION_LAYER_ALPHA_BLEND_FB TYPE_COMPOSITION_LAYER_ALPHA_BLEND_FB} value to the {@code type} field. */ - public Buffer type$Default() { return type(FBCompositionLayerAlphaBlend.XR_TYPE_COMPOSITION_LAYER_ALPHA_BLEND_FB); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrCompositionLayerAlphaBlendFB.nnext(address(), value); return this; } - /** Sets the specified value to the {@code srcFactorColor} field. */ - public Buffer srcFactorColor(@NativeType("XrBlendFactorFB") int value) { XrCompositionLayerAlphaBlendFB.nsrcFactorColor(address(), value); return this; } - /** Sets the specified value to the {@code dstFactorColor} field. */ - public Buffer dstFactorColor(@NativeType("XrBlendFactorFB") int value) { XrCompositionLayerAlphaBlendFB.ndstFactorColor(address(), value); return this; } - /** Sets the specified value to the {@code srcFactorAlpha} field. */ - public Buffer srcFactorAlpha(@NativeType("XrBlendFactorFB") int value) { XrCompositionLayerAlphaBlendFB.nsrcFactorAlpha(address(), value); return this; } - /** Sets the specified value to the {@code dstFactorAlpha} field. */ - public Buffer dstFactorAlpha(@NativeType("XrBlendFactorFB") int value) { XrCompositionLayerAlphaBlendFB.ndstFactorAlpha(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrCompositionLayerBaseHeader.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrCompositionLayerBaseHeader.java deleted file mode 100644 index 041652f6..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrCompositionLayerBaseHeader.java +++ /dev/null @@ -1,337 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrCompositionLayerBaseHeader {
- *     XrStructureType type;
- *     void const * next;
- *     XrCompositionLayerFlags layerFlags;
- *     XrSpace space;
- * }
- */ -public class XrCompositionLayerBaseHeader extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - LAYERFLAGS, - SPACE; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(8), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - LAYERFLAGS = layout.offsetof(2); - SPACE = layout.offsetof(3); - } - - /** - * Creates a {@code XrCompositionLayerBaseHeader} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrCompositionLayerBaseHeader(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code layerFlags} field. */ - @NativeType("XrCompositionLayerFlags") - public long layerFlags() { return nlayerFlags(address()); } - /** @return the value of the {@code space} field. */ - @NativeType("XrSpace") - public long space() { return nspace(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrCompositionLayerBaseHeader type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the specified value to the {@code next} field. */ - public XrCompositionLayerBaseHeader next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code layerFlags} field. */ - public XrCompositionLayerBaseHeader layerFlags(@NativeType("XrCompositionLayerFlags") long value) { nlayerFlags(address(), value); return this; } - /** Sets the specified value to the {@code space} field. */ - public XrCompositionLayerBaseHeader space(XrSpace value) { nspace(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrCompositionLayerBaseHeader set( - int type, - long next, - long layerFlags, - XrSpace space - ) { - type(type); - next(next); - layerFlags(layerFlags); - space(space); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrCompositionLayerBaseHeader set(XrCompositionLayerBaseHeader src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrCompositionLayerBaseHeader} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrCompositionLayerBaseHeader malloc() { - return wrap(XrCompositionLayerBaseHeader.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrCompositionLayerBaseHeader} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrCompositionLayerBaseHeader calloc() { - return wrap(XrCompositionLayerBaseHeader.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrCompositionLayerBaseHeader} instance allocated with {@link BufferUtils}. */ - public static XrCompositionLayerBaseHeader create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrCompositionLayerBaseHeader.class, memAddress(container), container); - } - - /** Returns a new {@code XrCompositionLayerBaseHeader} instance for the specified memory address. */ - public static XrCompositionLayerBaseHeader create(long address) { - return wrap(XrCompositionLayerBaseHeader.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrCompositionLayerBaseHeader createSafe(long address) { - return address == NULL ? null : wrap(XrCompositionLayerBaseHeader.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrCompositionLayerBaseHeader.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrCompositionLayerBaseHeader} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrCompositionLayerBaseHeader malloc(MemoryStack stack) { - return wrap(XrCompositionLayerBaseHeader.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrCompositionLayerBaseHeader} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrCompositionLayerBaseHeader calloc(MemoryStack stack) { - return wrap(XrCompositionLayerBaseHeader.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrCompositionLayerBaseHeader.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrCompositionLayerBaseHeader.NEXT); } - /** Unsafe version of {@link #layerFlags}. */ - public static long nlayerFlags(long struct) { return UNSAFE.getLong(null, struct + XrCompositionLayerBaseHeader.LAYERFLAGS); } - /** Unsafe version of {@link #space}. */ - public static long nspace(long struct) { return memGetAddress(struct + XrCompositionLayerBaseHeader.SPACE); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrCompositionLayerBaseHeader.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrCompositionLayerBaseHeader.NEXT, value); } - /** Unsafe version of {@link #layerFlags(long) layerFlags}. */ - public static void nlayerFlags(long struct, long value) { UNSAFE.putLong(null, struct + XrCompositionLayerBaseHeader.LAYERFLAGS, value); } - /** Unsafe version of {@link #space(XrSpace) space}. */ - public static void nspace(long struct, XrSpace value) { memPutAddress(struct + XrCompositionLayerBaseHeader.SPACE, value.address()); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XrCompositionLayerBaseHeader.SPACE)); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrCompositionLayerBaseHeader} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrCompositionLayerBaseHeader ELEMENT_FACTORY = XrCompositionLayerBaseHeader.create(-1L); - - /** - * Creates a new {@code XrCompositionLayerBaseHeader.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrCompositionLayerBaseHeader#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrCompositionLayerBaseHeader getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrCompositionLayerBaseHeader.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrCompositionLayerBaseHeader.nnext(address()); } - /** @return the value of the {@code layerFlags} field. */ - @NativeType("XrCompositionLayerFlags") - public long layerFlags() { return XrCompositionLayerBaseHeader.nlayerFlags(address()); } - /** @return the value of the {@code space} field. */ - @NativeType("XrSpace") - public long space() { return XrCompositionLayerBaseHeader.nspace(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrCompositionLayerBaseHeader.ntype(address(), value); return this; } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrCompositionLayerBaseHeader.nnext(address(), value); return this; } - /** Sets the specified value to the {@code layerFlags} field. */ - public Buffer layerFlags(@NativeType("XrCompositionLayerFlags") long value) { XrCompositionLayerBaseHeader.nlayerFlags(address(), value); return this; } - /** Sets the specified value to the {@code space} field. */ - public Buffer space(XrSpace value) { XrCompositionLayerBaseHeader.nspace(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrCompositionLayerColorScaleBiasKHR.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrCompositionLayerColorScaleBiasKHR.java deleted file mode 100644 index 46fde740..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrCompositionLayerColorScaleBiasKHR.java +++ /dev/null @@ -1,323 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrCompositionLayerColorScaleBiasKHR {
- *     XrStructureType type;
- *     void const * next;
- *     {@link XrColor4f XrColor4f} colorScale;
- *     {@link XrColor4f XrColor4f} colorBias;
- * }
- */ -public class XrCompositionLayerColorScaleBiasKHR extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - COLORSCALE, - COLORBIAS; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(XrColor4f.SIZEOF, XrColor4f.ALIGNOF), - __member(XrColor4f.SIZEOF, XrColor4f.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - COLORSCALE = layout.offsetof(2); - COLORBIAS = layout.offsetof(3); - } - - /** - * Creates a {@code XrCompositionLayerColorScaleBiasKHR} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrCompositionLayerColorScaleBiasKHR(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return a {@link XrColor4f} view of the {@code colorScale} field. */ - public XrColor4f colorScale() { return ncolorScale(address()); } - /** @return a {@link XrColor4f} view of the {@code colorBias} field. */ - public XrColor4f colorBias() { return ncolorBias(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrCompositionLayerColorScaleBiasKHR type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link KHRCompositionLayerColorScaleBias#XR_TYPE_COMPOSITION_LAYER_COLOR_SCALE_BIAS_KHR TYPE_COMPOSITION_LAYER_COLOR_SCALE_BIAS_KHR} value to the {@code type} field. */ - public XrCompositionLayerColorScaleBiasKHR type$Default() { return type(KHRCompositionLayerColorScaleBias.XR_TYPE_COMPOSITION_LAYER_COLOR_SCALE_BIAS_KHR); } - /** Sets the specified value to the {@code next} field. */ - public XrCompositionLayerColorScaleBiasKHR next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Copies the specified {@link XrColor4f} to the {@code colorScale} field. */ - public XrCompositionLayerColorScaleBiasKHR colorScale(XrColor4f value) { ncolorScale(address(), value); return this; } - /** Passes the {@code colorScale} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrCompositionLayerColorScaleBiasKHR colorScale(java.util.function.Consumer consumer) { consumer.accept(colorScale()); return this; } - /** Copies the specified {@link XrColor4f} to the {@code colorBias} field. */ - public XrCompositionLayerColorScaleBiasKHR colorBias(XrColor4f value) { ncolorBias(address(), value); return this; } - /** Passes the {@code colorBias} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrCompositionLayerColorScaleBiasKHR colorBias(java.util.function.Consumer consumer) { consumer.accept(colorBias()); return this; } - - /** Initializes this struct with the specified values. */ - public XrCompositionLayerColorScaleBiasKHR set( - int type, - long next, - XrColor4f colorScale, - XrColor4f colorBias - ) { - type(type); - next(next); - colorScale(colorScale); - colorBias(colorBias); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrCompositionLayerColorScaleBiasKHR set(XrCompositionLayerColorScaleBiasKHR src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrCompositionLayerColorScaleBiasKHR} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrCompositionLayerColorScaleBiasKHR malloc() { - return wrap(XrCompositionLayerColorScaleBiasKHR.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrCompositionLayerColorScaleBiasKHR} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrCompositionLayerColorScaleBiasKHR calloc() { - return wrap(XrCompositionLayerColorScaleBiasKHR.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrCompositionLayerColorScaleBiasKHR} instance allocated with {@link BufferUtils}. */ - public static XrCompositionLayerColorScaleBiasKHR create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrCompositionLayerColorScaleBiasKHR.class, memAddress(container), container); - } - - /** Returns a new {@code XrCompositionLayerColorScaleBiasKHR} instance for the specified memory address. */ - public static XrCompositionLayerColorScaleBiasKHR create(long address) { - return wrap(XrCompositionLayerColorScaleBiasKHR.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrCompositionLayerColorScaleBiasKHR createSafe(long address) { - return address == NULL ? null : wrap(XrCompositionLayerColorScaleBiasKHR.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrCompositionLayerColorScaleBiasKHR.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrCompositionLayerColorScaleBiasKHR} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrCompositionLayerColorScaleBiasKHR malloc(MemoryStack stack) { - return wrap(XrCompositionLayerColorScaleBiasKHR.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrCompositionLayerColorScaleBiasKHR} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrCompositionLayerColorScaleBiasKHR calloc(MemoryStack stack) { - return wrap(XrCompositionLayerColorScaleBiasKHR.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrCompositionLayerColorScaleBiasKHR.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrCompositionLayerColorScaleBiasKHR.NEXT); } - /** Unsafe version of {@link #colorScale}. */ - public static XrColor4f ncolorScale(long struct) { return XrColor4f.create(struct + XrCompositionLayerColorScaleBiasKHR.COLORSCALE); } - /** Unsafe version of {@link #colorBias}. */ - public static XrColor4f ncolorBias(long struct) { return XrColor4f.create(struct + XrCompositionLayerColorScaleBiasKHR.COLORBIAS); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrCompositionLayerColorScaleBiasKHR.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrCompositionLayerColorScaleBiasKHR.NEXT, value); } - /** Unsafe version of {@link #colorScale(XrColor4f) colorScale}. */ - public static void ncolorScale(long struct, XrColor4f value) { memCopy(value.address(), struct + XrCompositionLayerColorScaleBiasKHR.COLORSCALE, XrColor4f.SIZEOF); } - /** Unsafe version of {@link #colorBias(XrColor4f) colorBias}. */ - public static void ncolorBias(long struct, XrColor4f value) { memCopy(value.address(), struct + XrCompositionLayerColorScaleBiasKHR.COLORBIAS, XrColor4f.SIZEOF); } - - // ----------------------------------- - - /** An array of {@link XrCompositionLayerColorScaleBiasKHR} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrCompositionLayerColorScaleBiasKHR ELEMENT_FACTORY = XrCompositionLayerColorScaleBiasKHR.create(-1L); - - /** - * Creates a new {@code XrCompositionLayerColorScaleBiasKHR.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrCompositionLayerColorScaleBiasKHR#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrCompositionLayerColorScaleBiasKHR getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrCompositionLayerColorScaleBiasKHR.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrCompositionLayerColorScaleBiasKHR.nnext(address()); } - /** @return a {@link XrColor4f} view of the {@code colorScale} field. */ - public XrColor4f colorScale() { return XrCompositionLayerColorScaleBiasKHR.ncolorScale(address()); } - /** @return a {@link XrColor4f} view of the {@code colorBias} field. */ - public XrColor4f colorBias() { return XrCompositionLayerColorScaleBiasKHR.ncolorBias(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrCompositionLayerColorScaleBiasKHR.ntype(address(), value); return this; } - /** Sets the {@link KHRCompositionLayerColorScaleBias#XR_TYPE_COMPOSITION_LAYER_COLOR_SCALE_BIAS_KHR TYPE_COMPOSITION_LAYER_COLOR_SCALE_BIAS_KHR} value to the {@code type} field. */ - public Buffer type$Default() { return type(KHRCompositionLayerColorScaleBias.XR_TYPE_COMPOSITION_LAYER_COLOR_SCALE_BIAS_KHR); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrCompositionLayerColorScaleBiasKHR.nnext(address(), value); return this; } - /** Copies the specified {@link XrColor4f} to the {@code colorScale} field. */ - public Buffer colorScale(XrColor4f value) { XrCompositionLayerColorScaleBiasKHR.ncolorScale(address(), value); return this; } - /** Passes the {@code colorScale} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer colorScale(java.util.function.Consumer consumer) { consumer.accept(colorScale()); return this; } - /** Copies the specified {@link XrColor4f} to the {@code colorBias} field. */ - public Buffer colorBias(XrColor4f value) { XrCompositionLayerColorScaleBiasKHR.ncolorBias(address(), value); return this; } - /** Passes the {@code colorBias} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer colorBias(java.util.function.Consumer consumer) { consumer.accept(colorBias()); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrCompositionLayerCubeKHR.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrCompositionLayerCubeKHR.java deleted file mode 100644 index 9462da23..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrCompositionLayerCubeKHR.java +++ /dev/null @@ -1,424 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrCompositionLayerCubeKHR {
- *     XrStructureType type;
- *     void const * next;
- *     XrCompositionLayerFlags layerFlags;
- *     XrSpace space;
- *     XrEyeVisibility eyeVisibility;
- *     XrSwapchain swapchain;
- *     uint32_t imageArrayIndex;
- *     {@link XrQuaternionf XrQuaternionf} orientation;
- * }
- */ -public class XrCompositionLayerCubeKHR extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - LAYERFLAGS, - SPACE, - EYEVISIBILITY, - SWAPCHAIN, - IMAGEARRAYINDEX, - ORIENTATION; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(8), - __member(POINTER_SIZE), - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(XrQuaternionf.SIZEOF, XrQuaternionf.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - LAYERFLAGS = layout.offsetof(2); - SPACE = layout.offsetof(3); - EYEVISIBILITY = layout.offsetof(4); - SWAPCHAIN = layout.offsetof(5); - IMAGEARRAYINDEX = layout.offsetof(6); - ORIENTATION = layout.offsetof(7); - } - - /** - * Creates a {@code XrCompositionLayerCubeKHR} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrCompositionLayerCubeKHR(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code layerFlags} field. */ - @NativeType("XrCompositionLayerFlags") - public long layerFlags() { return nlayerFlags(address()); } - /** @return the value of the {@code space} field. */ - @NativeType("XrSpace") - public long space() { return nspace(address()); } - /** @return the value of the {@code eyeVisibility} field. */ - @NativeType("XrEyeVisibility") - public int eyeVisibility() { return neyeVisibility(address()); } - /** @return the value of the {@code swapchain} field. */ - @NativeType("XrSwapchain") - public long swapchain() { return nswapchain(address()); } - /** @return the value of the {@code imageArrayIndex} field. */ - @NativeType("uint32_t") - public int imageArrayIndex() { return nimageArrayIndex(address()); } - /** @return a {@link XrQuaternionf} view of the {@code orientation} field. */ - public XrQuaternionf orientation() { return norientation(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrCompositionLayerCubeKHR type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link KHRCompositionLayerCube#XR_TYPE_COMPOSITION_LAYER_CUBE_KHR TYPE_COMPOSITION_LAYER_CUBE_KHR} value to the {@code type} field. */ - public XrCompositionLayerCubeKHR type$Default() { return type(KHRCompositionLayerCube.XR_TYPE_COMPOSITION_LAYER_CUBE_KHR); } - /** Sets the specified value to the {@code next} field. */ - public XrCompositionLayerCubeKHR next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code layerFlags} field. */ - public XrCompositionLayerCubeKHR layerFlags(@NativeType("XrCompositionLayerFlags") long value) { nlayerFlags(address(), value); return this; } - /** Sets the specified value to the {@code space} field. */ - public XrCompositionLayerCubeKHR space(XrSpace value) { nspace(address(), value); return this; } - /** Sets the specified value to the {@code eyeVisibility} field. */ - public XrCompositionLayerCubeKHR eyeVisibility(@NativeType("XrEyeVisibility") int value) { neyeVisibility(address(), value); return this; } - /** Sets the specified value to the {@code swapchain} field. */ - public XrCompositionLayerCubeKHR swapchain(XrSwapchain value) { nswapchain(address(), value); return this; } - /** Sets the specified value to the {@code imageArrayIndex} field. */ - public XrCompositionLayerCubeKHR imageArrayIndex(@NativeType("uint32_t") int value) { nimageArrayIndex(address(), value); return this; } - /** Copies the specified {@link XrQuaternionf} to the {@code orientation} field. */ - public XrCompositionLayerCubeKHR orientation(XrQuaternionf value) { norientation(address(), value); return this; } - /** Passes the {@code orientation} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrCompositionLayerCubeKHR orientation(java.util.function.Consumer consumer) { consumer.accept(orientation()); return this; } - - /** Initializes this struct with the specified values. */ - public XrCompositionLayerCubeKHR set( - int type, - long next, - long layerFlags, - XrSpace space, - int eyeVisibility, - XrSwapchain swapchain, - int imageArrayIndex, - XrQuaternionf orientation - ) { - type(type); - next(next); - layerFlags(layerFlags); - space(space); - eyeVisibility(eyeVisibility); - swapchain(swapchain); - imageArrayIndex(imageArrayIndex); - orientation(orientation); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrCompositionLayerCubeKHR set(XrCompositionLayerCubeKHR src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrCompositionLayerCubeKHR} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrCompositionLayerCubeKHR malloc() { - return wrap(XrCompositionLayerCubeKHR.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrCompositionLayerCubeKHR} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrCompositionLayerCubeKHR calloc() { - return wrap(XrCompositionLayerCubeKHR.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrCompositionLayerCubeKHR} instance allocated with {@link BufferUtils}. */ - public static XrCompositionLayerCubeKHR create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrCompositionLayerCubeKHR.class, memAddress(container), container); - } - - /** Returns a new {@code XrCompositionLayerCubeKHR} instance for the specified memory address. */ - public static XrCompositionLayerCubeKHR create(long address) { - return wrap(XrCompositionLayerCubeKHR.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrCompositionLayerCubeKHR createSafe(long address) { - return address == NULL ? null : wrap(XrCompositionLayerCubeKHR.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrCompositionLayerCubeKHR.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrCompositionLayerCubeKHR} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrCompositionLayerCubeKHR malloc(MemoryStack stack) { - return wrap(XrCompositionLayerCubeKHR.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrCompositionLayerCubeKHR} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrCompositionLayerCubeKHR calloc(MemoryStack stack) { - return wrap(XrCompositionLayerCubeKHR.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrCompositionLayerCubeKHR.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrCompositionLayerCubeKHR.NEXT); } - /** Unsafe version of {@link #layerFlags}. */ - public static long nlayerFlags(long struct) { return UNSAFE.getLong(null, struct + XrCompositionLayerCubeKHR.LAYERFLAGS); } - /** Unsafe version of {@link #space}. */ - public static long nspace(long struct) { return memGetAddress(struct + XrCompositionLayerCubeKHR.SPACE); } - /** Unsafe version of {@link #eyeVisibility}. */ - public static int neyeVisibility(long struct) { return UNSAFE.getInt(null, struct + XrCompositionLayerCubeKHR.EYEVISIBILITY); } - /** Unsafe version of {@link #swapchain}. */ - public static long nswapchain(long struct) { return memGetAddress(struct + XrCompositionLayerCubeKHR.SWAPCHAIN); } - /** Unsafe version of {@link #imageArrayIndex}. */ - public static int nimageArrayIndex(long struct) { return UNSAFE.getInt(null, struct + XrCompositionLayerCubeKHR.IMAGEARRAYINDEX); } - /** Unsafe version of {@link #orientation}. */ - public static XrQuaternionf norientation(long struct) { return XrQuaternionf.create(struct + XrCompositionLayerCubeKHR.ORIENTATION); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrCompositionLayerCubeKHR.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrCompositionLayerCubeKHR.NEXT, value); } - /** Unsafe version of {@link #layerFlags(long) layerFlags}. */ - public static void nlayerFlags(long struct, long value) { UNSAFE.putLong(null, struct + XrCompositionLayerCubeKHR.LAYERFLAGS, value); } - /** Unsafe version of {@link #space(XrSpace) space}. */ - public static void nspace(long struct, XrSpace value) { memPutAddress(struct + XrCompositionLayerCubeKHR.SPACE, value.address()); } - /** Unsafe version of {@link #eyeVisibility(int) eyeVisibility}. */ - public static void neyeVisibility(long struct, int value) { UNSAFE.putInt(null, struct + XrCompositionLayerCubeKHR.EYEVISIBILITY, value); } - /** Unsafe version of {@link #swapchain(XrSwapchain) swapchain}. */ - public static void nswapchain(long struct, XrSwapchain value) { memPutAddress(struct + XrCompositionLayerCubeKHR.SWAPCHAIN, value.address()); } - /** Unsafe version of {@link #imageArrayIndex(int) imageArrayIndex}. */ - public static void nimageArrayIndex(long struct, int value) { UNSAFE.putInt(null, struct + XrCompositionLayerCubeKHR.IMAGEARRAYINDEX, value); } - /** Unsafe version of {@link #orientation(XrQuaternionf) orientation}. */ - public static void norientation(long struct, XrQuaternionf value) { memCopy(value.address(), struct + XrCompositionLayerCubeKHR.ORIENTATION, XrQuaternionf.SIZEOF); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XrCompositionLayerCubeKHR.SPACE)); - check(memGetAddress(struct + XrCompositionLayerCubeKHR.SWAPCHAIN)); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrCompositionLayerCubeKHR} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrCompositionLayerCubeKHR ELEMENT_FACTORY = XrCompositionLayerCubeKHR.create(-1L); - - /** - * Creates a new {@code XrCompositionLayerCubeKHR.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrCompositionLayerCubeKHR#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrCompositionLayerCubeKHR getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrCompositionLayerCubeKHR.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrCompositionLayerCubeKHR.nnext(address()); } - /** @return the value of the {@code layerFlags} field. */ - @NativeType("XrCompositionLayerFlags") - public long layerFlags() { return XrCompositionLayerCubeKHR.nlayerFlags(address()); } - /** @return the value of the {@code space} field. */ - @NativeType("XrSpace") - public long space() { return XrCompositionLayerCubeKHR.nspace(address()); } - /** @return the value of the {@code eyeVisibility} field. */ - @NativeType("XrEyeVisibility") - public int eyeVisibility() { return XrCompositionLayerCubeKHR.neyeVisibility(address()); } - /** @return the value of the {@code swapchain} field. */ - @NativeType("XrSwapchain") - public long swapchain() { return XrCompositionLayerCubeKHR.nswapchain(address()); } - /** @return the value of the {@code imageArrayIndex} field. */ - @NativeType("uint32_t") - public int imageArrayIndex() { return XrCompositionLayerCubeKHR.nimageArrayIndex(address()); } - /** @return a {@link XrQuaternionf} view of the {@code orientation} field. */ - public XrQuaternionf orientation() { return XrCompositionLayerCubeKHR.norientation(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrCompositionLayerCubeKHR.ntype(address(), value); return this; } - /** Sets the {@link KHRCompositionLayerCube#XR_TYPE_COMPOSITION_LAYER_CUBE_KHR TYPE_COMPOSITION_LAYER_CUBE_KHR} value to the {@code type} field. */ - public Buffer type$Default() { return type(KHRCompositionLayerCube.XR_TYPE_COMPOSITION_LAYER_CUBE_KHR); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrCompositionLayerCubeKHR.nnext(address(), value); return this; } - /** Sets the specified value to the {@code layerFlags} field. */ - public Buffer layerFlags(@NativeType("XrCompositionLayerFlags") long value) { XrCompositionLayerCubeKHR.nlayerFlags(address(), value); return this; } - /** Sets the specified value to the {@code space} field. */ - public Buffer space(XrSpace value) { XrCompositionLayerCubeKHR.nspace(address(), value); return this; } - /** Sets the specified value to the {@code eyeVisibility} field. */ - public Buffer eyeVisibility(@NativeType("XrEyeVisibility") int value) { XrCompositionLayerCubeKHR.neyeVisibility(address(), value); return this; } - /** Sets the specified value to the {@code swapchain} field. */ - public Buffer swapchain(XrSwapchain value) { XrCompositionLayerCubeKHR.nswapchain(address(), value); return this; } - /** Sets the specified value to the {@code imageArrayIndex} field. */ - public Buffer imageArrayIndex(@NativeType("uint32_t") int value) { XrCompositionLayerCubeKHR.nimageArrayIndex(address(), value); return this; } - /** Copies the specified {@link XrQuaternionf} to the {@code orientation} field. */ - public Buffer orientation(XrQuaternionf value) { XrCompositionLayerCubeKHR.norientation(address(), value); return this; } - /** Passes the {@code orientation} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer orientation(java.util.function.Consumer consumer) { consumer.accept(orientation()); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrCompositionLayerCylinderKHR.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrCompositionLayerCylinderKHR.java deleted file mode 100644 index c04418a2..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrCompositionLayerCylinderKHR.java +++ /dev/null @@ -1,460 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrCompositionLayerCylinderKHR {
- *     XrStructureType type;
- *     void const * next;
- *     XrCompositionLayerFlags layerFlags;
- *     XrSpace space;
- *     XrEyeVisibility eyeVisibility;
- *     {@link XrSwapchainSubImage XrSwapchainSubImage} subImage;
- *     {@link XrPosef XrPosef} pose;
- *     float radius;
- *     float centralAngle;
- *     float aspectRatio;
- * }
- */ -public class XrCompositionLayerCylinderKHR extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - LAYERFLAGS, - SPACE, - EYEVISIBILITY, - SUBIMAGE, - POSE, - RADIUS, - CENTRALANGLE, - ASPECTRATIO; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(8), - __member(POINTER_SIZE), - __member(4), - __member(XrSwapchainSubImage.SIZEOF, XrSwapchainSubImage.ALIGNOF), - __member(XrPosef.SIZEOF, XrPosef.ALIGNOF), - __member(4), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - LAYERFLAGS = layout.offsetof(2); - SPACE = layout.offsetof(3); - EYEVISIBILITY = layout.offsetof(4); - SUBIMAGE = layout.offsetof(5); - POSE = layout.offsetof(6); - RADIUS = layout.offsetof(7); - CENTRALANGLE = layout.offsetof(8); - ASPECTRATIO = layout.offsetof(9); - } - - /** - * Creates a {@code XrCompositionLayerCylinderKHR} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrCompositionLayerCylinderKHR(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code layerFlags} field. */ - @NativeType("XrCompositionLayerFlags") - public long layerFlags() { return nlayerFlags(address()); } - /** @return the value of the {@code space} field. */ - @NativeType("XrSpace") - public long space() { return nspace(address()); } - /** @return the value of the {@code eyeVisibility} field. */ - @NativeType("XrEyeVisibility") - public int eyeVisibility() { return neyeVisibility(address()); } - /** @return a {@link XrSwapchainSubImage} view of the {@code subImage} field. */ - public XrSwapchainSubImage subImage() { return nsubImage(address()); } - /** @return a {@link XrPosef} view of the {@code pose} field. */ - public XrPosef pose() { return npose(address()); } - /** @return the value of the {@code radius} field. */ - public float radius() { return nradius(address()); } - /** @return the value of the {@code centralAngle} field. */ - public float centralAngle() { return ncentralAngle(address()); } - /** @return the value of the {@code aspectRatio} field. */ - public float aspectRatio() { return naspectRatio(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrCompositionLayerCylinderKHR type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link KHRCompositionLayerCylinder#XR_TYPE_COMPOSITION_LAYER_CYLINDER_KHR TYPE_COMPOSITION_LAYER_CYLINDER_KHR} value to the {@code type} field. */ - public XrCompositionLayerCylinderKHR type$Default() { return type(KHRCompositionLayerCylinder.XR_TYPE_COMPOSITION_LAYER_CYLINDER_KHR); } - /** Sets the specified value to the {@code next} field. */ - public XrCompositionLayerCylinderKHR next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code layerFlags} field. */ - public XrCompositionLayerCylinderKHR layerFlags(@NativeType("XrCompositionLayerFlags") long value) { nlayerFlags(address(), value); return this; } - /** Sets the specified value to the {@code space} field. */ - public XrCompositionLayerCylinderKHR space(XrSpace value) { nspace(address(), value); return this; } - /** Sets the specified value to the {@code eyeVisibility} field. */ - public XrCompositionLayerCylinderKHR eyeVisibility(@NativeType("XrEyeVisibility") int value) { neyeVisibility(address(), value); return this; } - /** Copies the specified {@link XrSwapchainSubImage} to the {@code subImage} field. */ - public XrCompositionLayerCylinderKHR subImage(XrSwapchainSubImage value) { nsubImage(address(), value); return this; } - /** Passes the {@code subImage} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrCompositionLayerCylinderKHR subImage(java.util.function.Consumer consumer) { consumer.accept(subImage()); return this; } - /** Copies the specified {@link XrPosef} to the {@code pose} field. */ - public XrCompositionLayerCylinderKHR pose(XrPosef value) { npose(address(), value); return this; } - /** Passes the {@code pose} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrCompositionLayerCylinderKHR pose(java.util.function.Consumer consumer) { consumer.accept(pose()); return this; } - /** Sets the specified value to the {@code radius} field. */ - public XrCompositionLayerCylinderKHR radius(float value) { nradius(address(), value); return this; } - /** Sets the specified value to the {@code centralAngle} field. */ - public XrCompositionLayerCylinderKHR centralAngle(float value) { ncentralAngle(address(), value); return this; } - /** Sets the specified value to the {@code aspectRatio} field. */ - public XrCompositionLayerCylinderKHR aspectRatio(float value) { naspectRatio(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrCompositionLayerCylinderKHR set( - int type, - long next, - long layerFlags, - XrSpace space, - int eyeVisibility, - XrSwapchainSubImage subImage, - XrPosef pose, - float radius, - float centralAngle, - float aspectRatio - ) { - type(type); - next(next); - layerFlags(layerFlags); - space(space); - eyeVisibility(eyeVisibility); - subImage(subImage); - pose(pose); - radius(radius); - centralAngle(centralAngle); - aspectRatio(aspectRatio); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrCompositionLayerCylinderKHR set(XrCompositionLayerCylinderKHR src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrCompositionLayerCylinderKHR} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrCompositionLayerCylinderKHR malloc() { - return wrap(XrCompositionLayerCylinderKHR.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrCompositionLayerCylinderKHR} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrCompositionLayerCylinderKHR calloc() { - return wrap(XrCompositionLayerCylinderKHR.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrCompositionLayerCylinderKHR} instance allocated with {@link BufferUtils}. */ - public static XrCompositionLayerCylinderKHR create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrCompositionLayerCylinderKHR.class, memAddress(container), container); - } - - /** Returns a new {@code XrCompositionLayerCylinderKHR} instance for the specified memory address. */ - public static XrCompositionLayerCylinderKHR create(long address) { - return wrap(XrCompositionLayerCylinderKHR.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrCompositionLayerCylinderKHR createSafe(long address) { - return address == NULL ? null : wrap(XrCompositionLayerCylinderKHR.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrCompositionLayerCylinderKHR.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrCompositionLayerCylinderKHR} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrCompositionLayerCylinderKHR malloc(MemoryStack stack) { - return wrap(XrCompositionLayerCylinderKHR.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrCompositionLayerCylinderKHR} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrCompositionLayerCylinderKHR calloc(MemoryStack stack) { - return wrap(XrCompositionLayerCylinderKHR.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrCompositionLayerCylinderKHR.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrCompositionLayerCylinderKHR.NEXT); } - /** Unsafe version of {@link #layerFlags}. */ - public static long nlayerFlags(long struct) { return UNSAFE.getLong(null, struct + XrCompositionLayerCylinderKHR.LAYERFLAGS); } - /** Unsafe version of {@link #space}. */ - public static long nspace(long struct) { return memGetAddress(struct + XrCompositionLayerCylinderKHR.SPACE); } - /** Unsafe version of {@link #eyeVisibility}. */ - public static int neyeVisibility(long struct) { return UNSAFE.getInt(null, struct + XrCompositionLayerCylinderKHR.EYEVISIBILITY); } - /** Unsafe version of {@link #subImage}. */ - public static XrSwapchainSubImage nsubImage(long struct) { return XrSwapchainSubImage.create(struct + XrCompositionLayerCylinderKHR.SUBIMAGE); } - /** Unsafe version of {@link #pose}. */ - public static XrPosef npose(long struct) { return XrPosef.create(struct + XrCompositionLayerCylinderKHR.POSE); } - /** Unsafe version of {@link #radius}. */ - public static float nradius(long struct) { return UNSAFE.getFloat(null, struct + XrCompositionLayerCylinderKHR.RADIUS); } - /** Unsafe version of {@link #centralAngle}. */ - public static float ncentralAngle(long struct) { return UNSAFE.getFloat(null, struct + XrCompositionLayerCylinderKHR.CENTRALANGLE); } - /** Unsafe version of {@link #aspectRatio}. */ - public static float naspectRatio(long struct) { return UNSAFE.getFloat(null, struct + XrCompositionLayerCylinderKHR.ASPECTRATIO); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrCompositionLayerCylinderKHR.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrCompositionLayerCylinderKHR.NEXT, value); } - /** Unsafe version of {@link #layerFlags(long) layerFlags}. */ - public static void nlayerFlags(long struct, long value) { UNSAFE.putLong(null, struct + XrCompositionLayerCylinderKHR.LAYERFLAGS, value); } - /** Unsafe version of {@link #space(XrSpace) space}. */ - public static void nspace(long struct, XrSpace value) { memPutAddress(struct + XrCompositionLayerCylinderKHR.SPACE, value.address()); } - /** Unsafe version of {@link #eyeVisibility(int) eyeVisibility}. */ - public static void neyeVisibility(long struct, int value) { UNSAFE.putInt(null, struct + XrCompositionLayerCylinderKHR.EYEVISIBILITY, value); } - /** Unsafe version of {@link #subImage(XrSwapchainSubImage) subImage}. */ - public static void nsubImage(long struct, XrSwapchainSubImage value) { memCopy(value.address(), struct + XrCompositionLayerCylinderKHR.SUBIMAGE, XrSwapchainSubImage.SIZEOF); } - /** Unsafe version of {@link #pose(XrPosef) pose}. */ - public static void npose(long struct, XrPosef value) { memCopy(value.address(), struct + XrCompositionLayerCylinderKHR.POSE, XrPosef.SIZEOF); } - /** Unsafe version of {@link #radius(float) radius}. */ - public static void nradius(long struct, float value) { UNSAFE.putFloat(null, struct + XrCompositionLayerCylinderKHR.RADIUS, value); } - /** Unsafe version of {@link #centralAngle(float) centralAngle}. */ - public static void ncentralAngle(long struct, float value) { UNSAFE.putFloat(null, struct + XrCompositionLayerCylinderKHR.CENTRALANGLE, value); } - /** Unsafe version of {@link #aspectRatio(float) aspectRatio}. */ - public static void naspectRatio(long struct, float value) { UNSAFE.putFloat(null, struct + XrCompositionLayerCylinderKHR.ASPECTRATIO, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XrCompositionLayerCylinderKHR.SPACE)); - XrSwapchainSubImage.validate(struct + XrCompositionLayerCylinderKHR.SUBIMAGE); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrCompositionLayerCylinderKHR} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrCompositionLayerCylinderKHR ELEMENT_FACTORY = XrCompositionLayerCylinderKHR.create(-1L); - - /** - * Creates a new {@code XrCompositionLayerCylinderKHR.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrCompositionLayerCylinderKHR#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrCompositionLayerCylinderKHR getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrCompositionLayerCylinderKHR.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrCompositionLayerCylinderKHR.nnext(address()); } - /** @return the value of the {@code layerFlags} field. */ - @NativeType("XrCompositionLayerFlags") - public long layerFlags() { return XrCompositionLayerCylinderKHR.nlayerFlags(address()); } - /** @return the value of the {@code space} field. */ - @NativeType("XrSpace") - public long space() { return XrCompositionLayerCylinderKHR.nspace(address()); } - /** @return the value of the {@code eyeVisibility} field. */ - @NativeType("XrEyeVisibility") - public int eyeVisibility() { return XrCompositionLayerCylinderKHR.neyeVisibility(address()); } - /** @return a {@link XrSwapchainSubImage} view of the {@code subImage} field. */ - public XrSwapchainSubImage subImage() { return XrCompositionLayerCylinderKHR.nsubImage(address()); } - /** @return a {@link XrPosef} view of the {@code pose} field. */ - public XrPosef pose() { return XrCompositionLayerCylinderKHR.npose(address()); } - /** @return the value of the {@code radius} field. */ - public float radius() { return XrCompositionLayerCylinderKHR.nradius(address()); } - /** @return the value of the {@code centralAngle} field. */ - public float centralAngle() { return XrCompositionLayerCylinderKHR.ncentralAngle(address()); } - /** @return the value of the {@code aspectRatio} field. */ - public float aspectRatio() { return XrCompositionLayerCylinderKHR.naspectRatio(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrCompositionLayerCylinderKHR.ntype(address(), value); return this; } - /** Sets the {@link KHRCompositionLayerCylinder#XR_TYPE_COMPOSITION_LAYER_CYLINDER_KHR TYPE_COMPOSITION_LAYER_CYLINDER_KHR} value to the {@code type} field. */ - public Buffer type$Default() { return type(KHRCompositionLayerCylinder.XR_TYPE_COMPOSITION_LAYER_CYLINDER_KHR); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrCompositionLayerCylinderKHR.nnext(address(), value); return this; } - /** Sets the specified value to the {@code layerFlags} field. */ - public Buffer layerFlags(@NativeType("XrCompositionLayerFlags") long value) { XrCompositionLayerCylinderKHR.nlayerFlags(address(), value); return this; } - /** Sets the specified value to the {@code space} field. */ - public Buffer space(XrSpace value) { XrCompositionLayerCylinderKHR.nspace(address(), value); return this; } - /** Sets the specified value to the {@code eyeVisibility} field. */ - public Buffer eyeVisibility(@NativeType("XrEyeVisibility") int value) { XrCompositionLayerCylinderKHR.neyeVisibility(address(), value); return this; } - /** Copies the specified {@link XrSwapchainSubImage} to the {@code subImage} field. */ - public Buffer subImage(XrSwapchainSubImage value) { XrCompositionLayerCylinderKHR.nsubImage(address(), value); return this; } - /** Passes the {@code subImage} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer subImage(java.util.function.Consumer consumer) { consumer.accept(subImage()); return this; } - /** Copies the specified {@link XrPosef} to the {@code pose} field. */ - public Buffer pose(XrPosef value) { XrCompositionLayerCylinderKHR.npose(address(), value); return this; } - /** Passes the {@code pose} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer pose(java.util.function.Consumer consumer) { consumer.accept(pose()); return this; } - /** Sets the specified value to the {@code radius} field. */ - public Buffer radius(float value) { XrCompositionLayerCylinderKHR.nradius(address(), value); return this; } - /** Sets the specified value to the {@code centralAngle} field. */ - public Buffer centralAngle(float value) { XrCompositionLayerCylinderKHR.ncentralAngle(address(), value); return this; } - /** Sets the specified value to the {@code aspectRatio} field. */ - public Buffer aspectRatio(float value) { XrCompositionLayerCylinderKHR.naspectRatio(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrCompositionLayerDepthInfoKHR.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrCompositionLayerDepthInfoKHR.java deleted file mode 100644 index 277482cd..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrCompositionLayerDepthInfoKHR.java +++ /dev/null @@ -1,394 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrCompositionLayerDepthInfoKHR {
- *     XrStructureType type;
- *     void const * next;
- *     {@link XrSwapchainSubImage XrSwapchainSubImage} subImage;
- *     float minDepth;
- *     float maxDepth;
- *     float nearZ;
- *     float farZ;
- * }
- */ -public class XrCompositionLayerDepthInfoKHR extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - SUBIMAGE, - MINDEPTH, - MAXDEPTH, - NEARZ, - FARZ; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(XrSwapchainSubImage.SIZEOF, XrSwapchainSubImage.ALIGNOF), - __member(4), - __member(4), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - SUBIMAGE = layout.offsetof(2); - MINDEPTH = layout.offsetof(3); - MAXDEPTH = layout.offsetof(4); - NEARZ = layout.offsetof(5); - FARZ = layout.offsetof(6); - } - - /** - * Creates a {@code XrCompositionLayerDepthInfoKHR} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrCompositionLayerDepthInfoKHR(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return a {@link XrSwapchainSubImage} view of the {@code subImage} field. */ - public XrSwapchainSubImage subImage() { return nsubImage(address()); } - /** @return the value of the {@code minDepth} field. */ - public float minDepth() { return nminDepth(address()); } - /** @return the value of the {@code maxDepth} field. */ - public float maxDepth() { return nmaxDepth(address()); } - /** @return the value of the {@code nearZ} field. */ - public float nearZ() { return nnearZ(address()); } - /** @return the value of the {@code farZ} field. */ - public float farZ() { return nfarZ(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrCompositionLayerDepthInfoKHR type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link KHRCompositionLayerDepth#XR_TYPE_COMPOSITION_LAYER_DEPTH_INFO_KHR TYPE_COMPOSITION_LAYER_DEPTH_INFO_KHR} value to the {@code type} field. */ - public XrCompositionLayerDepthInfoKHR type$Default() { return type(KHRCompositionLayerDepth.XR_TYPE_COMPOSITION_LAYER_DEPTH_INFO_KHR); } - /** Sets the specified value to the {@code next} field. */ - public XrCompositionLayerDepthInfoKHR next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Copies the specified {@link XrSwapchainSubImage} to the {@code subImage} field. */ - public XrCompositionLayerDepthInfoKHR subImage(XrSwapchainSubImage value) { nsubImage(address(), value); return this; } - /** Passes the {@code subImage} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrCompositionLayerDepthInfoKHR subImage(java.util.function.Consumer consumer) { consumer.accept(subImage()); return this; } - /** Sets the specified value to the {@code minDepth} field. */ - public XrCompositionLayerDepthInfoKHR minDepth(float value) { nminDepth(address(), value); return this; } - /** Sets the specified value to the {@code maxDepth} field. */ - public XrCompositionLayerDepthInfoKHR maxDepth(float value) { nmaxDepth(address(), value); return this; } - /** Sets the specified value to the {@code nearZ} field. */ - public XrCompositionLayerDepthInfoKHR nearZ(float value) { nnearZ(address(), value); return this; } - /** Sets the specified value to the {@code farZ} field. */ - public XrCompositionLayerDepthInfoKHR farZ(float value) { nfarZ(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrCompositionLayerDepthInfoKHR set( - int type, - long next, - XrSwapchainSubImage subImage, - float minDepth, - float maxDepth, - float nearZ, - float farZ - ) { - type(type); - next(next); - subImage(subImage); - minDepth(minDepth); - maxDepth(maxDepth); - nearZ(nearZ); - farZ(farZ); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrCompositionLayerDepthInfoKHR set(XrCompositionLayerDepthInfoKHR src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrCompositionLayerDepthInfoKHR} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrCompositionLayerDepthInfoKHR malloc() { - return wrap(XrCompositionLayerDepthInfoKHR.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrCompositionLayerDepthInfoKHR} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrCompositionLayerDepthInfoKHR calloc() { - return wrap(XrCompositionLayerDepthInfoKHR.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrCompositionLayerDepthInfoKHR} instance allocated with {@link BufferUtils}. */ - public static XrCompositionLayerDepthInfoKHR create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrCompositionLayerDepthInfoKHR.class, memAddress(container), container); - } - - /** Returns a new {@code XrCompositionLayerDepthInfoKHR} instance for the specified memory address. */ - public static XrCompositionLayerDepthInfoKHR create(long address) { - return wrap(XrCompositionLayerDepthInfoKHR.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrCompositionLayerDepthInfoKHR createSafe(long address) { - return address == NULL ? null : wrap(XrCompositionLayerDepthInfoKHR.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrCompositionLayerDepthInfoKHR.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrCompositionLayerDepthInfoKHR} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrCompositionLayerDepthInfoKHR malloc(MemoryStack stack) { - return wrap(XrCompositionLayerDepthInfoKHR.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrCompositionLayerDepthInfoKHR} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrCompositionLayerDepthInfoKHR calloc(MemoryStack stack) { - return wrap(XrCompositionLayerDepthInfoKHR.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrCompositionLayerDepthInfoKHR.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrCompositionLayerDepthInfoKHR.NEXT); } - /** Unsafe version of {@link #subImage}. */ - public static XrSwapchainSubImage nsubImage(long struct) { return XrSwapchainSubImage.create(struct + XrCompositionLayerDepthInfoKHR.SUBIMAGE); } - /** Unsafe version of {@link #minDepth}. */ - public static float nminDepth(long struct) { return UNSAFE.getFloat(null, struct + XrCompositionLayerDepthInfoKHR.MINDEPTH); } - /** Unsafe version of {@link #maxDepth}. */ - public static float nmaxDepth(long struct) { return UNSAFE.getFloat(null, struct + XrCompositionLayerDepthInfoKHR.MAXDEPTH); } - /** Unsafe version of {@link #nearZ}. */ - public static float nnearZ(long struct) { return UNSAFE.getFloat(null, struct + XrCompositionLayerDepthInfoKHR.NEARZ); } - /** Unsafe version of {@link #farZ}. */ - public static float nfarZ(long struct) { return UNSAFE.getFloat(null, struct + XrCompositionLayerDepthInfoKHR.FARZ); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrCompositionLayerDepthInfoKHR.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrCompositionLayerDepthInfoKHR.NEXT, value); } - /** Unsafe version of {@link #subImage(XrSwapchainSubImage) subImage}. */ - public static void nsubImage(long struct, XrSwapchainSubImage value) { memCopy(value.address(), struct + XrCompositionLayerDepthInfoKHR.SUBIMAGE, XrSwapchainSubImage.SIZEOF); } - /** Unsafe version of {@link #minDepth(float) minDepth}. */ - public static void nminDepth(long struct, float value) { UNSAFE.putFloat(null, struct + XrCompositionLayerDepthInfoKHR.MINDEPTH, value); } - /** Unsafe version of {@link #maxDepth(float) maxDepth}. */ - public static void nmaxDepth(long struct, float value) { UNSAFE.putFloat(null, struct + XrCompositionLayerDepthInfoKHR.MAXDEPTH, value); } - /** Unsafe version of {@link #nearZ(float) nearZ}. */ - public static void nnearZ(long struct, float value) { UNSAFE.putFloat(null, struct + XrCompositionLayerDepthInfoKHR.NEARZ, value); } - /** Unsafe version of {@link #farZ(float) farZ}. */ - public static void nfarZ(long struct, float value) { UNSAFE.putFloat(null, struct + XrCompositionLayerDepthInfoKHR.FARZ, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - XrSwapchainSubImage.validate(struct + XrCompositionLayerDepthInfoKHR.SUBIMAGE); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrCompositionLayerDepthInfoKHR} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrCompositionLayerDepthInfoKHR ELEMENT_FACTORY = XrCompositionLayerDepthInfoKHR.create(-1L); - - /** - * Creates a new {@code XrCompositionLayerDepthInfoKHR.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrCompositionLayerDepthInfoKHR#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrCompositionLayerDepthInfoKHR getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrCompositionLayerDepthInfoKHR.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrCompositionLayerDepthInfoKHR.nnext(address()); } - /** @return a {@link XrSwapchainSubImage} view of the {@code subImage} field. */ - public XrSwapchainSubImage subImage() { return XrCompositionLayerDepthInfoKHR.nsubImage(address()); } - /** @return the value of the {@code minDepth} field. */ - public float minDepth() { return XrCompositionLayerDepthInfoKHR.nminDepth(address()); } - /** @return the value of the {@code maxDepth} field. */ - public float maxDepth() { return XrCompositionLayerDepthInfoKHR.nmaxDepth(address()); } - /** @return the value of the {@code nearZ} field. */ - public float nearZ() { return XrCompositionLayerDepthInfoKHR.nnearZ(address()); } - /** @return the value of the {@code farZ} field. */ - public float farZ() { return XrCompositionLayerDepthInfoKHR.nfarZ(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrCompositionLayerDepthInfoKHR.ntype(address(), value); return this; } - /** Sets the {@link KHRCompositionLayerDepth#XR_TYPE_COMPOSITION_LAYER_DEPTH_INFO_KHR TYPE_COMPOSITION_LAYER_DEPTH_INFO_KHR} value to the {@code type} field. */ - public Buffer type$Default() { return type(KHRCompositionLayerDepth.XR_TYPE_COMPOSITION_LAYER_DEPTH_INFO_KHR); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrCompositionLayerDepthInfoKHR.nnext(address(), value); return this; } - /** Copies the specified {@link XrSwapchainSubImage} to the {@code subImage} field. */ - public Buffer subImage(XrSwapchainSubImage value) { XrCompositionLayerDepthInfoKHR.nsubImage(address(), value); return this; } - /** Passes the {@code subImage} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer subImage(java.util.function.Consumer consumer) { consumer.accept(subImage()); return this; } - /** Sets the specified value to the {@code minDepth} field. */ - public Buffer minDepth(float value) { XrCompositionLayerDepthInfoKHR.nminDepth(address(), value); return this; } - /** Sets the specified value to the {@code maxDepth} field. */ - public Buffer maxDepth(float value) { XrCompositionLayerDepthInfoKHR.nmaxDepth(address(), value); return this; } - /** Sets the specified value to the {@code nearZ} field. */ - public Buffer nearZ(float value) { XrCompositionLayerDepthInfoKHR.nnearZ(address(), value); return this; } - /** Sets the specified value to the {@code farZ} field. */ - public Buffer farZ(float value) { XrCompositionLayerDepthInfoKHR.nfarZ(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrCompositionLayerDepthTestVARJO.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrCompositionLayerDepthTestVARJO.java deleted file mode 100644 index 65d3df98..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrCompositionLayerDepthTestVARJO.java +++ /dev/null @@ -1,315 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrCompositionLayerDepthTestVARJO {
- *     XrStructureType type;
- *     void const * next;
- *     float depthTestRangeNearZ;
- *     float depthTestRangeFarZ;
- * }
- */ -public class XrCompositionLayerDepthTestVARJO extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - DEPTHTESTRANGENEARZ, - DEPTHTESTRANGEFARZ; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - DEPTHTESTRANGENEARZ = layout.offsetof(2); - DEPTHTESTRANGEFARZ = layout.offsetof(3); - } - - /** - * Creates a {@code XrCompositionLayerDepthTestVARJO} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrCompositionLayerDepthTestVARJO(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code depthTestRangeNearZ} field. */ - public float depthTestRangeNearZ() { return ndepthTestRangeNearZ(address()); } - /** @return the value of the {@code depthTestRangeFarZ} field. */ - public float depthTestRangeFarZ() { return ndepthTestRangeFarZ(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrCompositionLayerDepthTestVARJO type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link VARJOCompositionLayerDepthTest#XR_TYPE_COMPOSITION_LAYER_DEPTH_TEST_VARJO TYPE_COMPOSITION_LAYER_DEPTH_TEST_VARJO} value to the {@code type} field. */ - public XrCompositionLayerDepthTestVARJO type$Default() { return type(VARJOCompositionLayerDepthTest.XR_TYPE_COMPOSITION_LAYER_DEPTH_TEST_VARJO); } - /** Sets the specified value to the {@code next} field. */ - public XrCompositionLayerDepthTestVARJO next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code depthTestRangeNearZ} field. */ - public XrCompositionLayerDepthTestVARJO depthTestRangeNearZ(float value) { ndepthTestRangeNearZ(address(), value); return this; } - /** Sets the specified value to the {@code depthTestRangeFarZ} field. */ - public XrCompositionLayerDepthTestVARJO depthTestRangeFarZ(float value) { ndepthTestRangeFarZ(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrCompositionLayerDepthTestVARJO set( - int type, - long next, - float depthTestRangeNearZ, - float depthTestRangeFarZ - ) { - type(type); - next(next); - depthTestRangeNearZ(depthTestRangeNearZ); - depthTestRangeFarZ(depthTestRangeFarZ); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrCompositionLayerDepthTestVARJO set(XrCompositionLayerDepthTestVARJO src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrCompositionLayerDepthTestVARJO} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrCompositionLayerDepthTestVARJO malloc() { - return wrap(XrCompositionLayerDepthTestVARJO.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrCompositionLayerDepthTestVARJO} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrCompositionLayerDepthTestVARJO calloc() { - return wrap(XrCompositionLayerDepthTestVARJO.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrCompositionLayerDepthTestVARJO} instance allocated with {@link BufferUtils}. */ - public static XrCompositionLayerDepthTestVARJO create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrCompositionLayerDepthTestVARJO.class, memAddress(container), container); - } - - /** Returns a new {@code XrCompositionLayerDepthTestVARJO} instance for the specified memory address. */ - public static XrCompositionLayerDepthTestVARJO create(long address) { - return wrap(XrCompositionLayerDepthTestVARJO.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrCompositionLayerDepthTestVARJO createSafe(long address) { - return address == NULL ? null : wrap(XrCompositionLayerDepthTestVARJO.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrCompositionLayerDepthTestVARJO.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrCompositionLayerDepthTestVARJO} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrCompositionLayerDepthTestVARJO malloc(MemoryStack stack) { - return wrap(XrCompositionLayerDepthTestVARJO.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrCompositionLayerDepthTestVARJO} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrCompositionLayerDepthTestVARJO calloc(MemoryStack stack) { - return wrap(XrCompositionLayerDepthTestVARJO.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrCompositionLayerDepthTestVARJO.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrCompositionLayerDepthTestVARJO.NEXT); } - /** Unsafe version of {@link #depthTestRangeNearZ}. */ - public static float ndepthTestRangeNearZ(long struct) { return UNSAFE.getFloat(null, struct + XrCompositionLayerDepthTestVARJO.DEPTHTESTRANGENEARZ); } - /** Unsafe version of {@link #depthTestRangeFarZ}. */ - public static float ndepthTestRangeFarZ(long struct) { return UNSAFE.getFloat(null, struct + XrCompositionLayerDepthTestVARJO.DEPTHTESTRANGEFARZ); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrCompositionLayerDepthTestVARJO.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrCompositionLayerDepthTestVARJO.NEXT, value); } - /** Unsafe version of {@link #depthTestRangeNearZ(float) depthTestRangeNearZ}. */ - public static void ndepthTestRangeNearZ(long struct, float value) { UNSAFE.putFloat(null, struct + XrCompositionLayerDepthTestVARJO.DEPTHTESTRANGENEARZ, value); } - /** Unsafe version of {@link #depthTestRangeFarZ(float) depthTestRangeFarZ}. */ - public static void ndepthTestRangeFarZ(long struct, float value) { UNSAFE.putFloat(null, struct + XrCompositionLayerDepthTestVARJO.DEPTHTESTRANGEFARZ, value); } - - // ----------------------------------- - - /** An array of {@link XrCompositionLayerDepthTestVARJO} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrCompositionLayerDepthTestVARJO ELEMENT_FACTORY = XrCompositionLayerDepthTestVARJO.create(-1L); - - /** - * Creates a new {@code XrCompositionLayerDepthTestVARJO.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrCompositionLayerDepthTestVARJO#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrCompositionLayerDepthTestVARJO getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrCompositionLayerDepthTestVARJO.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrCompositionLayerDepthTestVARJO.nnext(address()); } - /** @return the value of the {@code depthTestRangeNearZ} field. */ - public float depthTestRangeNearZ() { return XrCompositionLayerDepthTestVARJO.ndepthTestRangeNearZ(address()); } - /** @return the value of the {@code depthTestRangeFarZ} field. */ - public float depthTestRangeFarZ() { return XrCompositionLayerDepthTestVARJO.ndepthTestRangeFarZ(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrCompositionLayerDepthTestVARJO.ntype(address(), value); return this; } - /** Sets the {@link VARJOCompositionLayerDepthTest#XR_TYPE_COMPOSITION_LAYER_DEPTH_TEST_VARJO TYPE_COMPOSITION_LAYER_DEPTH_TEST_VARJO} value to the {@code type} field. */ - public Buffer type$Default() { return type(VARJOCompositionLayerDepthTest.XR_TYPE_COMPOSITION_LAYER_DEPTH_TEST_VARJO); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrCompositionLayerDepthTestVARJO.nnext(address(), value); return this; } - /** Sets the specified value to the {@code depthTestRangeNearZ} field. */ - public Buffer depthTestRangeNearZ(float value) { XrCompositionLayerDepthTestVARJO.ndepthTestRangeNearZ(address(), value); return this; } - /** Sets the specified value to the {@code depthTestRangeFarZ} field. */ - public Buffer depthTestRangeFarZ(float value) { XrCompositionLayerDepthTestVARJO.ndepthTestRangeFarZ(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrCompositionLayerEquirect2KHR.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrCompositionLayerEquirect2KHR.java deleted file mode 100644 index 4587c583..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrCompositionLayerEquirect2KHR.java +++ /dev/null @@ -1,478 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrCompositionLayerEquirect2KHR {
- *     XrStructureType type;
- *     void const * next;
- *     XrCompositionLayerFlags layerFlags;
- *     XrSpace space;
- *     XrEyeVisibility eyeVisibility;
- *     {@link XrSwapchainSubImage XrSwapchainSubImage} subImage;
- *     {@link XrPosef XrPosef} pose;
- *     float radius;
- *     float centralHorizontalAngle;
- *     float upperVerticalAngle;
- *     float lowerVerticalAngle;
- * }
- */ -public class XrCompositionLayerEquirect2KHR extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - LAYERFLAGS, - SPACE, - EYEVISIBILITY, - SUBIMAGE, - POSE, - RADIUS, - CENTRALHORIZONTALANGLE, - UPPERVERTICALANGLE, - LOWERVERTICALANGLE; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(8), - __member(POINTER_SIZE), - __member(4), - __member(XrSwapchainSubImage.SIZEOF, XrSwapchainSubImage.ALIGNOF), - __member(XrPosef.SIZEOF, XrPosef.ALIGNOF), - __member(4), - __member(4), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - LAYERFLAGS = layout.offsetof(2); - SPACE = layout.offsetof(3); - EYEVISIBILITY = layout.offsetof(4); - SUBIMAGE = layout.offsetof(5); - POSE = layout.offsetof(6); - RADIUS = layout.offsetof(7); - CENTRALHORIZONTALANGLE = layout.offsetof(8); - UPPERVERTICALANGLE = layout.offsetof(9); - LOWERVERTICALANGLE = layout.offsetof(10); - } - - /** - * Creates a {@code XrCompositionLayerEquirect2KHR} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrCompositionLayerEquirect2KHR(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code layerFlags} field. */ - @NativeType("XrCompositionLayerFlags") - public long layerFlags() { return nlayerFlags(address()); } - /** @return the value of the {@code space} field. */ - @NativeType("XrSpace") - public long space() { return nspace(address()); } - /** @return the value of the {@code eyeVisibility} field. */ - @NativeType("XrEyeVisibility") - public int eyeVisibility() { return neyeVisibility(address()); } - /** @return a {@link XrSwapchainSubImage} view of the {@code subImage} field. */ - public XrSwapchainSubImage subImage() { return nsubImage(address()); } - /** @return a {@link XrPosef} view of the {@code pose} field. */ - public XrPosef pose() { return npose(address()); } - /** @return the value of the {@code radius} field. */ - public float radius() { return nradius(address()); } - /** @return the value of the {@code centralHorizontalAngle} field. */ - public float centralHorizontalAngle() { return ncentralHorizontalAngle(address()); } - /** @return the value of the {@code upperVerticalAngle} field. */ - public float upperVerticalAngle() { return nupperVerticalAngle(address()); } - /** @return the value of the {@code lowerVerticalAngle} field. */ - public float lowerVerticalAngle() { return nlowerVerticalAngle(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrCompositionLayerEquirect2KHR type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link KHRCompositionLayerEquirect2#XR_TYPE_COMPOSITION_LAYER_EQUIRECT2_KHR TYPE_COMPOSITION_LAYER_EQUIRECT2_KHR} value to the {@code type} field. */ - public XrCompositionLayerEquirect2KHR type$Default() { return type(KHRCompositionLayerEquirect2.XR_TYPE_COMPOSITION_LAYER_EQUIRECT2_KHR); } - /** Sets the specified value to the {@code next} field. */ - public XrCompositionLayerEquirect2KHR next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code layerFlags} field. */ - public XrCompositionLayerEquirect2KHR layerFlags(@NativeType("XrCompositionLayerFlags") long value) { nlayerFlags(address(), value); return this; } - /** Sets the specified value to the {@code space} field. */ - public XrCompositionLayerEquirect2KHR space(XrSpace value) { nspace(address(), value); return this; } - /** Sets the specified value to the {@code eyeVisibility} field. */ - public XrCompositionLayerEquirect2KHR eyeVisibility(@NativeType("XrEyeVisibility") int value) { neyeVisibility(address(), value); return this; } - /** Copies the specified {@link XrSwapchainSubImage} to the {@code subImage} field. */ - public XrCompositionLayerEquirect2KHR subImage(XrSwapchainSubImage value) { nsubImage(address(), value); return this; } - /** Passes the {@code subImage} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrCompositionLayerEquirect2KHR subImage(java.util.function.Consumer consumer) { consumer.accept(subImage()); return this; } - /** Copies the specified {@link XrPosef} to the {@code pose} field. */ - public XrCompositionLayerEquirect2KHR pose(XrPosef value) { npose(address(), value); return this; } - /** Passes the {@code pose} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrCompositionLayerEquirect2KHR pose(java.util.function.Consumer consumer) { consumer.accept(pose()); return this; } - /** Sets the specified value to the {@code radius} field. */ - public XrCompositionLayerEquirect2KHR radius(float value) { nradius(address(), value); return this; } - /** Sets the specified value to the {@code centralHorizontalAngle} field. */ - public XrCompositionLayerEquirect2KHR centralHorizontalAngle(float value) { ncentralHorizontalAngle(address(), value); return this; } - /** Sets the specified value to the {@code upperVerticalAngle} field. */ - public XrCompositionLayerEquirect2KHR upperVerticalAngle(float value) { nupperVerticalAngle(address(), value); return this; } - /** Sets the specified value to the {@code lowerVerticalAngle} field. */ - public XrCompositionLayerEquirect2KHR lowerVerticalAngle(float value) { nlowerVerticalAngle(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrCompositionLayerEquirect2KHR set( - int type, - long next, - long layerFlags, - XrSpace space, - int eyeVisibility, - XrSwapchainSubImage subImage, - XrPosef pose, - float radius, - float centralHorizontalAngle, - float upperVerticalAngle, - float lowerVerticalAngle - ) { - type(type); - next(next); - layerFlags(layerFlags); - space(space); - eyeVisibility(eyeVisibility); - subImage(subImage); - pose(pose); - radius(radius); - centralHorizontalAngle(centralHorizontalAngle); - upperVerticalAngle(upperVerticalAngle); - lowerVerticalAngle(lowerVerticalAngle); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrCompositionLayerEquirect2KHR set(XrCompositionLayerEquirect2KHR src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrCompositionLayerEquirect2KHR} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrCompositionLayerEquirect2KHR malloc() { - return wrap(XrCompositionLayerEquirect2KHR.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrCompositionLayerEquirect2KHR} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrCompositionLayerEquirect2KHR calloc() { - return wrap(XrCompositionLayerEquirect2KHR.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrCompositionLayerEquirect2KHR} instance allocated with {@link BufferUtils}. */ - public static XrCompositionLayerEquirect2KHR create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrCompositionLayerEquirect2KHR.class, memAddress(container), container); - } - - /** Returns a new {@code XrCompositionLayerEquirect2KHR} instance for the specified memory address. */ - public static XrCompositionLayerEquirect2KHR create(long address) { - return wrap(XrCompositionLayerEquirect2KHR.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrCompositionLayerEquirect2KHR createSafe(long address) { - return address == NULL ? null : wrap(XrCompositionLayerEquirect2KHR.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrCompositionLayerEquirect2KHR.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrCompositionLayerEquirect2KHR} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrCompositionLayerEquirect2KHR malloc(MemoryStack stack) { - return wrap(XrCompositionLayerEquirect2KHR.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrCompositionLayerEquirect2KHR} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrCompositionLayerEquirect2KHR calloc(MemoryStack stack) { - return wrap(XrCompositionLayerEquirect2KHR.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrCompositionLayerEquirect2KHR.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrCompositionLayerEquirect2KHR.NEXT); } - /** Unsafe version of {@link #layerFlags}. */ - public static long nlayerFlags(long struct) { return UNSAFE.getLong(null, struct + XrCompositionLayerEquirect2KHR.LAYERFLAGS); } - /** Unsafe version of {@link #space}. */ - public static long nspace(long struct) { return memGetAddress(struct + XrCompositionLayerEquirect2KHR.SPACE); } - /** Unsafe version of {@link #eyeVisibility}. */ - public static int neyeVisibility(long struct) { return UNSAFE.getInt(null, struct + XrCompositionLayerEquirect2KHR.EYEVISIBILITY); } - /** Unsafe version of {@link #subImage}. */ - public static XrSwapchainSubImage nsubImage(long struct) { return XrSwapchainSubImage.create(struct + XrCompositionLayerEquirect2KHR.SUBIMAGE); } - /** Unsafe version of {@link #pose}. */ - public static XrPosef npose(long struct) { return XrPosef.create(struct + XrCompositionLayerEquirect2KHR.POSE); } - /** Unsafe version of {@link #radius}. */ - public static float nradius(long struct) { return UNSAFE.getFloat(null, struct + XrCompositionLayerEquirect2KHR.RADIUS); } - /** Unsafe version of {@link #centralHorizontalAngle}. */ - public static float ncentralHorizontalAngle(long struct) { return UNSAFE.getFloat(null, struct + XrCompositionLayerEquirect2KHR.CENTRALHORIZONTALANGLE); } - /** Unsafe version of {@link #upperVerticalAngle}. */ - public static float nupperVerticalAngle(long struct) { return UNSAFE.getFloat(null, struct + XrCompositionLayerEquirect2KHR.UPPERVERTICALANGLE); } - /** Unsafe version of {@link #lowerVerticalAngle}. */ - public static float nlowerVerticalAngle(long struct) { return UNSAFE.getFloat(null, struct + XrCompositionLayerEquirect2KHR.LOWERVERTICALANGLE); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrCompositionLayerEquirect2KHR.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrCompositionLayerEquirect2KHR.NEXT, value); } - /** Unsafe version of {@link #layerFlags(long) layerFlags}. */ - public static void nlayerFlags(long struct, long value) { UNSAFE.putLong(null, struct + XrCompositionLayerEquirect2KHR.LAYERFLAGS, value); } - /** Unsafe version of {@link #space(XrSpace) space}. */ - public static void nspace(long struct, XrSpace value) { memPutAddress(struct + XrCompositionLayerEquirect2KHR.SPACE, value.address()); } - /** Unsafe version of {@link #eyeVisibility(int) eyeVisibility}. */ - public static void neyeVisibility(long struct, int value) { UNSAFE.putInt(null, struct + XrCompositionLayerEquirect2KHR.EYEVISIBILITY, value); } - /** Unsafe version of {@link #subImage(XrSwapchainSubImage) subImage}. */ - public static void nsubImage(long struct, XrSwapchainSubImage value) { memCopy(value.address(), struct + XrCompositionLayerEquirect2KHR.SUBIMAGE, XrSwapchainSubImage.SIZEOF); } - /** Unsafe version of {@link #pose(XrPosef) pose}. */ - public static void npose(long struct, XrPosef value) { memCopy(value.address(), struct + XrCompositionLayerEquirect2KHR.POSE, XrPosef.SIZEOF); } - /** Unsafe version of {@link #radius(float) radius}. */ - public static void nradius(long struct, float value) { UNSAFE.putFloat(null, struct + XrCompositionLayerEquirect2KHR.RADIUS, value); } - /** Unsafe version of {@link #centralHorizontalAngle(float) centralHorizontalAngle}. */ - public static void ncentralHorizontalAngle(long struct, float value) { UNSAFE.putFloat(null, struct + XrCompositionLayerEquirect2KHR.CENTRALHORIZONTALANGLE, value); } - /** Unsafe version of {@link #upperVerticalAngle(float) upperVerticalAngle}. */ - public static void nupperVerticalAngle(long struct, float value) { UNSAFE.putFloat(null, struct + XrCompositionLayerEquirect2KHR.UPPERVERTICALANGLE, value); } - /** Unsafe version of {@link #lowerVerticalAngle(float) lowerVerticalAngle}. */ - public static void nlowerVerticalAngle(long struct, float value) { UNSAFE.putFloat(null, struct + XrCompositionLayerEquirect2KHR.LOWERVERTICALANGLE, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XrCompositionLayerEquirect2KHR.SPACE)); - XrSwapchainSubImage.validate(struct + XrCompositionLayerEquirect2KHR.SUBIMAGE); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrCompositionLayerEquirect2KHR} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrCompositionLayerEquirect2KHR ELEMENT_FACTORY = XrCompositionLayerEquirect2KHR.create(-1L); - - /** - * Creates a new {@code XrCompositionLayerEquirect2KHR.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrCompositionLayerEquirect2KHR#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrCompositionLayerEquirect2KHR getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrCompositionLayerEquirect2KHR.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrCompositionLayerEquirect2KHR.nnext(address()); } - /** @return the value of the {@code layerFlags} field. */ - @NativeType("XrCompositionLayerFlags") - public long layerFlags() { return XrCompositionLayerEquirect2KHR.nlayerFlags(address()); } - /** @return the value of the {@code space} field. */ - @NativeType("XrSpace") - public long space() { return XrCompositionLayerEquirect2KHR.nspace(address()); } - /** @return the value of the {@code eyeVisibility} field. */ - @NativeType("XrEyeVisibility") - public int eyeVisibility() { return XrCompositionLayerEquirect2KHR.neyeVisibility(address()); } - /** @return a {@link XrSwapchainSubImage} view of the {@code subImage} field. */ - public XrSwapchainSubImage subImage() { return XrCompositionLayerEquirect2KHR.nsubImage(address()); } - /** @return a {@link XrPosef} view of the {@code pose} field. */ - public XrPosef pose() { return XrCompositionLayerEquirect2KHR.npose(address()); } - /** @return the value of the {@code radius} field. */ - public float radius() { return XrCompositionLayerEquirect2KHR.nradius(address()); } - /** @return the value of the {@code centralHorizontalAngle} field. */ - public float centralHorizontalAngle() { return XrCompositionLayerEquirect2KHR.ncentralHorizontalAngle(address()); } - /** @return the value of the {@code upperVerticalAngle} field. */ - public float upperVerticalAngle() { return XrCompositionLayerEquirect2KHR.nupperVerticalAngle(address()); } - /** @return the value of the {@code lowerVerticalAngle} field. */ - public float lowerVerticalAngle() { return XrCompositionLayerEquirect2KHR.nlowerVerticalAngle(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrCompositionLayerEquirect2KHR.ntype(address(), value); return this; } - /** Sets the {@link KHRCompositionLayerEquirect2#XR_TYPE_COMPOSITION_LAYER_EQUIRECT2_KHR TYPE_COMPOSITION_LAYER_EQUIRECT2_KHR} value to the {@code type} field. */ - public Buffer type$Default() { return type(KHRCompositionLayerEquirect2.XR_TYPE_COMPOSITION_LAYER_EQUIRECT2_KHR); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrCompositionLayerEquirect2KHR.nnext(address(), value); return this; } - /** Sets the specified value to the {@code layerFlags} field. */ - public Buffer layerFlags(@NativeType("XrCompositionLayerFlags") long value) { XrCompositionLayerEquirect2KHR.nlayerFlags(address(), value); return this; } - /** Sets the specified value to the {@code space} field. */ - public Buffer space(XrSpace value) { XrCompositionLayerEquirect2KHR.nspace(address(), value); return this; } - /** Sets the specified value to the {@code eyeVisibility} field. */ - public Buffer eyeVisibility(@NativeType("XrEyeVisibility") int value) { XrCompositionLayerEquirect2KHR.neyeVisibility(address(), value); return this; } - /** Copies the specified {@link XrSwapchainSubImage} to the {@code subImage} field. */ - public Buffer subImage(XrSwapchainSubImage value) { XrCompositionLayerEquirect2KHR.nsubImage(address(), value); return this; } - /** Passes the {@code subImage} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer subImage(java.util.function.Consumer consumer) { consumer.accept(subImage()); return this; } - /** Copies the specified {@link XrPosef} to the {@code pose} field. */ - public Buffer pose(XrPosef value) { XrCompositionLayerEquirect2KHR.npose(address(), value); return this; } - /** Passes the {@code pose} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer pose(java.util.function.Consumer consumer) { consumer.accept(pose()); return this; } - /** Sets the specified value to the {@code radius} field. */ - public Buffer radius(float value) { XrCompositionLayerEquirect2KHR.nradius(address(), value); return this; } - /** Sets the specified value to the {@code centralHorizontalAngle} field. */ - public Buffer centralHorizontalAngle(float value) { XrCompositionLayerEquirect2KHR.ncentralHorizontalAngle(address(), value); return this; } - /** Sets the specified value to the {@code upperVerticalAngle} field. */ - public Buffer upperVerticalAngle(float value) { XrCompositionLayerEquirect2KHR.nupperVerticalAngle(address(), value); return this; } - /** Sets the specified value to the {@code lowerVerticalAngle} field. */ - public Buffer lowerVerticalAngle(float value) { XrCompositionLayerEquirect2KHR.nlowerVerticalAngle(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrCompositionLayerEquirectKHR.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrCompositionLayerEquirectKHR.java deleted file mode 100644 index 3e758f30..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrCompositionLayerEquirectKHR.java +++ /dev/null @@ -1,468 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrCompositionLayerEquirectKHR {
- *     XrStructureType type;
- *     void const * next;
- *     XrCompositionLayerFlags layerFlags;
- *     XrSpace space;
- *     XrEyeVisibility eyeVisibility;
- *     {@link XrSwapchainSubImage XrSwapchainSubImage} subImage;
- *     {@link XrPosef XrPosef} pose;
- *     float radius;
- *     {@link XrVector2f XrVector2f} scale;
- *     {@link XrVector2f XrVector2f} bias;
- * }
- */ -public class XrCompositionLayerEquirectKHR extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - LAYERFLAGS, - SPACE, - EYEVISIBILITY, - SUBIMAGE, - POSE, - RADIUS, - SCALE, - BIAS; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(8), - __member(POINTER_SIZE), - __member(4), - __member(XrSwapchainSubImage.SIZEOF, XrSwapchainSubImage.ALIGNOF), - __member(XrPosef.SIZEOF, XrPosef.ALIGNOF), - __member(4), - __member(XrVector2f.SIZEOF, XrVector2f.ALIGNOF), - __member(XrVector2f.SIZEOF, XrVector2f.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - LAYERFLAGS = layout.offsetof(2); - SPACE = layout.offsetof(3); - EYEVISIBILITY = layout.offsetof(4); - SUBIMAGE = layout.offsetof(5); - POSE = layout.offsetof(6); - RADIUS = layout.offsetof(7); - SCALE = layout.offsetof(8); - BIAS = layout.offsetof(9); - } - - /** - * Creates a {@code XrCompositionLayerEquirectKHR} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrCompositionLayerEquirectKHR(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code layerFlags} field. */ - @NativeType("XrCompositionLayerFlags") - public long layerFlags() { return nlayerFlags(address()); } - /** @return the value of the {@code space} field. */ - @NativeType("XrSpace") - public long space() { return nspace(address()); } - /** @return the value of the {@code eyeVisibility} field. */ - @NativeType("XrEyeVisibility") - public int eyeVisibility() { return neyeVisibility(address()); } - /** @return a {@link XrSwapchainSubImage} view of the {@code subImage} field. */ - public XrSwapchainSubImage subImage() { return nsubImage(address()); } - /** @return a {@link XrPosef} view of the {@code pose} field. */ - public XrPosef pose() { return npose(address()); } - /** @return the value of the {@code radius} field. */ - public float radius() { return nradius(address()); } - /** @return a {@link XrVector2f} view of the {@code scale} field. */ - public XrVector2f scale() { return nscale(address()); } - /** @return a {@link XrVector2f} view of the {@code bias} field. */ - public XrVector2f bias() { return nbias(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrCompositionLayerEquirectKHR type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link KHRCompositionLayerEquirect#XR_TYPE_COMPOSITION_LAYER_EQUIRECT_KHR TYPE_COMPOSITION_LAYER_EQUIRECT_KHR} value to the {@code type} field. */ - public XrCompositionLayerEquirectKHR type$Default() { return type(KHRCompositionLayerEquirect.XR_TYPE_COMPOSITION_LAYER_EQUIRECT_KHR); } - /** Sets the specified value to the {@code next} field. */ - public XrCompositionLayerEquirectKHR next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code layerFlags} field. */ - public XrCompositionLayerEquirectKHR layerFlags(@NativeType("XrCompositionLayerFlags") long value) { nlayerFlags(address(), value); return this; } - /** Sets the specified value to the {@code space} field. */ - public XrCompositionLayerEquirectKHR space(XrSpace value) { nspace(address(), value); return this; } - /** Sets the specified value to the {@code eyeVisibility} field. */ - public XrCompositionLayerEquirectKHR eyeVisibility(@NativeType("XrEyeVisibility") int value) { neyeVisibility(address(), value); return this; } - /** Copies the specified {@link XrSwapchainSubImage} to the {@code subImage} field. */ - public XrCompositionLayerEquirectKHR subImage(XrSwapchainSubImage value) { nsubImage(address(), value); return this; } - /** Passes the {@code subImage} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrCompositionLayerEquirectKHR subImage(java.util.function.Consumer consumer) { consumer.accept(subImage()); return this; } - /** Copies the specified {@link XrPosef} to the {@code pose} field. */ - public XrCompositionLayerEquirectKHR pose(XrPosef value) { npose(address(), value); return this; } - /** Passes the {@code pose} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrCompositionLayerEquirectKHR pose(java.util.function.Consumer consumer) { consumer.accept(pose()); return this; } - /** Sets the specified value to the {@code radius} field. */ - public XrCompositionLayerEquirectKHR radius(float value) { nradius(address(), value); return this; } - /** Copies the specified {@link XrVector2f} to the {@code scale} field. */ - public XrCompositionLayerEquirectKHR scale(XrVector2f value) { nscale(address(), value); return this; } - /** Passes the {@code scale} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrCompositionLayerEquirectKHR scale(java.util.function.Consumer consumer) { consumer.accept(scale()); return this; } - /** Copies the specified {@link XrVector2f} to the {@code bias} field. */ - public XrCompositionLayerEquirectKHR bias(XrVector2f value) { nbias(address(), value); return this; } - /** Passes the {@code bias} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrCompositionLayerEquirectKHR bias(java.util.function.Consumer consumer) { consumer.accept(bias()); return this; } - - /** Initializes this struct with the specified values. */ - public XrCompositionLayerEquirectKHR set( - int type, - long next, - long layerFlags, - XrSpace space, - int eyeVisibility, - XrSwapchainSubImage subImage, - XrPosef pose, - float radius, - XrVector2f scale, - XrVector2f bias - ) { - type(type); - next(next); - layerFlags(layerFlags); - space(space); - eyeVisibility(eyeVisibility); - subImage(subImage); - pose(pose); - radius(radius); - scale(scale); - bias(bias); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrCompositionLayerEquirectKHR set(XrCompositionLayerEquirectKHR src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrCompositionLayerEquirectKHR} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrCompositionLayerEquirectKHR malloc() { - return wrap(XrCompositionLayerEquirectKHR.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrCompositionLayerEquirectKHR} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrCompositionLayerEquirectKHR calloc() { - return wrap(XrCompositionLayerEquirectKHR.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrCompositionLayerEquirectKHR} instance allocated with {@link BufferUtils}. */ - public static XrCompositionLayerEquirectKHR create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrCompositionLayerEquirectKHR.class, memAddress(container), container); - } - - /** Returns a new {@code XrCompositionLayerEquirectKHR} instance for the specified memory address. */ - public static XrCompositionLayerEquirectKHR create(long address) { - return wrap(XrCompositionLayerEquirectKHR.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrCompositionLayerEquirectKHR createSafe(long address) { - return address == NULL ? null : wrap(XrCompositionLayerEquirectKHR.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrCompositionLayerEquirectKHR.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrCompositionLayerEquirectKHR} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrCompositionLayerEquirectKHR malloc(MemoryStack stack) { - return wrap(XrCompositionLayerEquirectKHR.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrCompositionLayerEquirectKHR} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrCompositionLayerEquirectKHR calloc(MemoryStack stack) { - return wrap(XrCompositionLayerEquirectKHR.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrCompositionLayerEquirectKHR.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrCompositionLayerEquirectKHR.NEXT); } - /** Unsafe version of {@link #layerFlags}. */ - public static long nlayerFlags(long struct) { return UNSAFE.getLong(null, struct + XrCompositionLayerEquirectKHR.LAYERFLAGS); } - /** Unsafe version of {@link #space}. */ - public static long nspace(long struct) { return memGetAddress(struct + XrCompositionLayerEquirectKHR.SPACE); } - /** Unsafe version of {@link #eyeVisibility}. */ - public static int neyeVisibility(long struct) { return UNSAFE.getInt(null, struct + XrCompositionLayerEquirectKHR.EYEVISIBILITY); } - /** Unsafe version of {@link #subImage}. */ - public static XrSwapchainSubImage nsubImage(long struct) { return XrSwapchainSubImage.create(struct + XrCompositionLayerEquirectKHR.SUBIMAGE); } - /** Unsafe version of {@link #pose}. */ - public static XrPosef npose(long struct) { return XrPosef.create(struct + XrCompositionLayerEquirectKHR.POSE); } - /** Unsafe version of {@link #radius}. */ - public static float nradius(long struct) { return UNSAFE.getFloat(null, struct + XrCompositionLayerEquirectKHR.RADIUS); } - /** Unsafe version of {@link #scale}. */ - public static XrVector2f nscale(long struct) { return XrVector2f.create(struct + XrCompositionLayerEquirectKHR.SCALE); } - /** Unsafe version of {@link #bias}. */ - public static XrVector2f nbias(long struct) { return XrVector2f.create(struct + XrCompositionLayerEquirectKHR.BIAS); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrCompositionLayerEquirectKHR.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrCompositionLayerEquirectKHR.NEXT, value); } - /** Unsafe version of {@link #layerFlags(long) layerFlags}. */ - public static void nlayerFlags(long struct, long value) { UNSAFE.putLong(null, struct + XrCompositionLayerEquirectKHR.LAYERFLAGS, value); } - /** Unsafe version of {@link #space(XrSpace) space}. */ - public static void nspace(long struct, XrSpace value) { memPutAddress(struct + XrCompositionLayerEquirectKHR.SPACE, value.address()); } - /** Unsafe version of {@link #eyeVisibility(int) eyeVisibility}. */ - public static void neyeVisibility(long struct, int value) { UNSAFE.putInt(null, struct + XrCompositionLayerEquirectKHR.EYEVISIBILITY, value); } - /** Unsafe version of {@link #subImage(XrSwapchainSubImage) subImage}. */ - public static void nsubImage(long struct, XrSwapchainSubImage value) { memCopy(value.address(), struct + XrCompositionLayerEquirectKHR.SUBIMAGE, XrSwapchainSubImage.SIZEOF); } - /** Unsafe version of {@link #pose(XrPosef) pose}. */ - public static void npose(long struct, XrPosef value) { memCopy(value.address(), struct + XrCompositionLayerEquirectKHR.POSE, XrPosef.SIZEOF); } - /** Unsafe version of {@link #radius(float) radius}. */ - public static void nradius(long struct, float value) { UNSAFE.putFloat(null, struct + XrCompositionLayerEquirectKHR.RADIUS, value); } - /** Unsafe version of {@link #scale(XrVector2f) scale}. */ - public static void nscale(long struct, XrVector2f value) { memCopy(value.address(), struct + XrCompositionLayerEquirectKHR.SCALE, XrVector2f.SIZEOF); } - /** Unsafe version of {@link #bias(XrVector2f) bias}. */ - public static void nbias(long struct, XrVector2f value) { memCopy(value.address(), struct + XrCompositionLayerEquirectKHR.BIAS, XrVector2f.SIZEOF); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XrCompositionLayerEquirectKHR.SPACE)); - XrSwapchainSubImage.validate(struct + XrCompositionLayerEquirectKHR.SUBIMAGE); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrCompositionLayerEquirectKHR} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrCompositionLayerEquirectKHR ELEMENT_FACTORY = XrCompositionLayerEquirectKHR.create(-1L); - - /** - * Creates a new {@code XrCompositionLayerEquirectKHR.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrCompositionLayerEquirectKHR#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrCompositionLayerEquirectKHR getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrCompositionLayerEquirectKHR.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrCompositionLayerEquirectKHR.nnext(address()); } - /** @return the value of the {@code layerFlags} field. */ - @NativeType("XrCompositionLayerFlags") - public long layerFlags() { return XrCompositionLayerEquirectKHR.nlayerFlags(address()); } - /** @return the value of the {@code space} field. */ - @NativeType("XrSpace") - public long space() { return XrCompositionLayerEquirectKHR.nspace(address()); } - /** @return the value of the {@code eyeVisibility} field. */ - @NativeType("XrEyeVisibility") - public int eyeVisibility() { return XrCompositionLayerEquirectKHR.neyeVisibility(address()); } - /** @return a {@link XrSwapchainSubImage} view of the {@code subImage} field. */ - public XrSwapchainSubImage subImage() { return XrCompositionLayerEquirectKHR.nsubImage(address()); } - /** @return a {@link XrPosef} view of the {@code pose} field. */ - public XrPosef pose() { return XrCompositionLayerEquirectKHR.npose(address()); } - /** @return the value of the {@code radius} field. */ - public float radius() { return XrCompositionLayerEquirectKHR.nradius(address()); } - /** @return a {@link XrVector2f} view of the {@code scale} field. */ - public XrVector2f scale() { return XrCompositionLayerEquirectKHR.nscale(address()); } - /** @return a {@link XrVector2f} view of the {@code bias} field. */ - public XrVector2f bias() { return XrCompositionLayerEquirectKHR.nbias(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrCompositionLayerEquirectKHR.ntype(address(), value); return this; } - /** Sets the {@link KHRCompositionLayerEquirect#XR_TYPE_COMPOSITION_LAYER_EQUIRECT_KHR TYPE_COMPOSITION_LAYER_EQUIRECT_KHR} value to the {@code type} field. */ - public Buffer type$Default() { return type(KHRCompositionLayerEquirect.XR_TYPE_COMPOSITION_LAYER_EQUIRECT_KHR); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrCompositionLayerEquirectKHR.nnext(address(), value); return this; } - /** Sets the specified value to the {@code layerFlags} field. */ - public Buffer layerFlags(@NativeType("XrCompositionLayerFlags") long value) { XrCompositionLayerEquirectKHR.nlayerFlags(address(), value); return this; } - /** Sets the specified value to the {@code space} field. */ - public Buffer space(XrSpace value) { XrCompositionLayerEquirectKHR.nspace(address(), value); return this; } - /** Sets the specified value to the {@code eyeVisibility} field. */ - public Buffer eyeVisibility(@NativeType("XrEyeVisibility") int value) { XrCompositionLayerEquirectKHR.neyeVisibility(address(), value); return this; } - /** Copies the specified {@link XrSwapchainSubImage} to the {@code subImage} field. */ - public Buffer subImage(XrSwapchainSubImage value) { XrCompositionLayerEquirectKHR.nsubImage(address(), value); return this; } - /** Passes the {@code subImage} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer subImage(java.util.function.Consumer consumer) { consumer.accept(subImage()); return this; } - /** Copies the specified {@link XrPosef} to the {@code pose} field. */ - public Buffer pose(XrPosef value) { XrCompositionLayerEquirectKHR.npose(address(), value); return this; } - /** Passes the {@code pose} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer pose(java.util.function.Consumer consumer) { consumer.accept(pose()); return this; } - /** Sets the specified value to the {@code radius} field. */ - public Buffer radius(float value) { XrCompositionLayerEquirectKHR.nradius(address(), value); return this; } - /** Copies the specified {@link XrVector2f} to the {@code scale} field. */ - public Buffer scale(XrVector2f value) { XrCompositionLayerEquirectKHR.nscale(address(), value); return this; } - /** Passes the {@code scale} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer scale(java.util.function.Consumer consumer) { consumer.accept(scale()); return this; } - /** Copies the specified {@link XrVector2f} to the {@code bias} field. */ - public Buffer bias(XrVector2f value) { XrCompositionLayerEquirectKHR.nbias(address(), value); return this; } - /** Passes the {@code bias} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer bias(java.util.function.Consumer consumer) { consumer.accept(bias()); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrCompositionLayerImageLayoutFB.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrCompositionLayerImageLayoutFB.java deleted file mode 100644 index c12d30d0..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrCompositionLayerImageLayoutFB.java +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrCompositionLayerImageLayoutFB {
- *     XrStructureType type;
- *     void * next;
- *     XrCompositionLayerImageLayoutFlagsFB flags;
- * }
- */ -public class XrCompositionLayerImageLayoutFB extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - FLAGS; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(8) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - FLAGS = layout.offsetof(2); - } - - /** - * Creates a {@code XrCompositionLayerImageLayoutFB} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrCompositionLayerImageLayoutFB(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return the value of the {@code flags} field. */ - @NativeType("XrCompositionLayerImageLayoutFlagsFB") - public long flags() { return nflags(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrCompositionLayerImageLayoutFB type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link FBCompositionLayerImageLayout#XR_TYPE_COMPOSITION_LAYER_IMAGE_LAYOUT_FB TYPE_COMPOSITION_LAYER_IMAGE_LAYOUT_FB} value to the {@code type} field. */ - public XrCompositionLayerImageLayoutFB type$Default() { return type(FBCompositionLayerImageLayout.XR_TYPE_COMPOSITION_LAYER_IMAGE_LAYOUT_FB); } - /** Sets the specified value to the {@code next} field. */ - public XrCompositionLayerImageLayoutFB next(@NativeType("void *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code flags} field. */ - public XrCompositionLayerImageLayoutFB flags(@NativeType("XrCompositionLayerImageLayoutFlagsFB") long value) { nflags(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrCompositionLayerImageLayoutFB set( - int type, - long next, - long flags - ) { - type(type); - next(next); - flags(flags); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrCompositionLayerImageLayoutFB set(XrCompositionLayerImageLayoutFB src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrCompositionLayerImageLayoutFB} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrCompositionLayerImageLayoutFB malloc() { - return wrap(XrCompositionLayerImageLayoutFB.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrCompositionLayerImageLayoutFB} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrCompositionLayerImageLayoutFB calloc() { - return wrap(XrCompositionLayerImageLayoutFB.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrCompositionLayerImageLayoutFB} instance allocated with {@link BufferUtils}. */ - public static XrCompositionLayerImageLayoutFB create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrCompositionLayerImageLayoutFB.class, memAddress(container), container); - } - - /** Returns a new {@code XrCompositionLayerImageLayoutFB} instance for the specified memory address. */ - public static XrCompositionLayerImageLayoutFB create(long address) { - return wrap(XrCompositionLayerImageLayoutFB.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrCompositionLayerImageLayoutFB createSafe(long address) { - return address == NULL ? null : wrap(XrCompositionLayerImageLayoutFB.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrCompositionLayerImageLayoutFB.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrCompositionLayerImageLayoutFB} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrCompositionLayerImageLayoutFB malloc(MemoryStack stack) { - return wrap(XrCompositionLayerImageLayoutFB.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrCompositionLayerImageLayoutFB} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrCompositionLayerImageLayoutFB calloc(MemoryStack stack) { - return wrap(XrCompositionLayerImageLayoutFB.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrCompositionLayerImageLayoutFB.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrCompositionLayerImageLayoutFB.NEXT); } - /** Unsafe version of {@link #flags}. */ - public static long nflags(long struct) { return UNSAFE.getLong(null, struct + XrCompositionLayerImageLayoutFB.FLAGS); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrCompositionLayerImageLayoutFB.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrCompositionLayerImageLayoutFB.NEXT, value); } - /** Unsafe version of {@link #flags(long) flags}. */ - public static void nflags(long struct, long value) { UNSAFE.putLong(null, struct + XrCompositionLayerImageLayoutFB.FLAGS, value); } - - // ----------------------------------- - - /** An array of {@link XrCompositionLayerImageLayoutFB} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrCompositionLayerImageLayoutFB ELEMENT_FACTORY = XrCompositionLayerImageLayoutFB.create(-1L); - - /** - * Creates a new {@code XrCompositionLayerImageLayoutFB.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrCompositionLayerImageLayoutFB#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrCompositionLayerImageLayoutFB getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrCompositionLayerImageLayoutFB.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrCompositionLayerImageLayoutFB.nnext(address()); } - /** @return the value of the {@code flags} field. */ - @NativeType("XrCompositionLayerImageLayoutFlagsFB") - public long flags() { return XrCompositionLayerImageLayoutFB.nflags(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrCompositionLayerImageLayoutFB.ntype(address(), value); return this; } - /** Sets the {@link FBCompositionLayerImageLayout#XR_TYPE_COMPOSITION_LAYER_IMAGE_LAYOUT_FB TYPE_COMPOSITION_LAYER_IMAGE_LAYOUT_FB} value to the {@code type} field. */ - public Buffer type$Default() { return type(FBCompositionLayerImageLayout.XR_TYPE_COMPOSITION_LAYER_IMAGE_LAYOUT_FB); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrCompositionLayerImageLayoutFB.nnext(address(), value); return this; } - /** Sets the specified value to the {@code flags} field. */ - public Buffer flags(@NativeType("XrCompositionLayerImageLayoutFlagsFB") long value) { XrCompositionLayerImageLayoutFB.nflags(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrCompositionLayerPassthroughFB.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrCompositionLayerPassthroughFB.java deleted file mode 100644 index 0130fb67..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrCompositionLayerPassthroughFB.java +++ /dev/null @@ -1,362 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrCompositionLayerPassthroughFB {
- *     XrStructureType type;
- *     void const * next;
- *     XrCompositionLayerFlags flags;
- *     XrSpace space;
- *     XrPassthroughLayerFB layerHandle;
- * }
- */ -public class XrCompositionLayerPassthroughFB extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - FLAGS, - SPACE, - LAYERHANDLE; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(8), - __member(POINTER_SIZE), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - FLAGS = layout.offsetof(2); - SPACE = layout.offsetof(3); - LAYERHANDLE = layout.offsetof(4); - } - - /** - * Creates a {@code XrCompositionLayerPassthroughFB} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrCompositionLayerPassthroughFB(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code flags} field. */ - @NativeType("XrCompositionLayerFlags") - public long flags() { return nflags(address()); } - /** @return the value of the {@code space} field. */ - @NativeType("XrSpace") - public long space() { return nspace(address()); } - /** @return the value of the {@code layerHandle} field. */ - @NativeType("XrPassthroughLayerFB") - public long layerHandle() { return nlayerHandle(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrCompositionLayerPassthroughFB type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link FBPassthrough#XR_TYPE_COMPOSITION_LAYER_PASSTHROUGH_FB TYPE_COMPOSITION_LAYER_PASSTHROUGH_FB} value to the {@code type} field. */ - public XrCompositionLayerPassthroughFB type$Default() { return type(FBPassthrough.XR_TYPE_COMPOSITION_LAYER_PASSTHROUGH_FB); } - /** Sets the specified value to the {@code next} field. */ - public XrCompositionLayerPassthroughFB next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code flags} field. */ - public XrCompositionLayerPassthroughFB flags(@NativeType("XrCompositionLayerFlags") long value) { nflags(address(), value); return this; } - /** Sets the specified value to the {@code space} field. */ - public XrCompositionLayerPassthroughFB space(XrSpace value) { nspace(address(), value); return this; } - /** Sets the specified value to the {@code layerHandle} field. */ - public XrCompositionLayerPassthroughFB layerHandle(XrPassthroughLayerFB value) { nlayerHandle(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrCompositionLayerPassthroughFB set( - int type, - long next, - long flags, - XrSpace space, - XrPassthroughLayerFB layerHandle - ) { - type(type); - next(next); - flags(flags); - space(space); - layerHandle(layerHandle); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrCompositionLayerPassthroughFB set(XrCompositionLayerPassthroughFB src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrCompositionLayerPassthroughFB} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrCompositionLayerPassthroughFB malloc() { - return wrap(XrCompositionLayerPassthroughFB.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrCompositionLayerPassthroughFB} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrCompositionLayerPassthroughFB calloc() { - return wrap(XrCompositionLayerPassthroughFB.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrCompositionLayerPassthroughFB} instance allocated with {@link BufferUtils}. */ - public static XrCompositionLayerPassthroughFB create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrCompositionLayerPassthroughFB.class, memAddress(container), container); - } - - /** Returns a new {@code XrCompositionLayerPassthroughFB} instance for the specified memory address. */ - public static XrCompositionLayerPassthroughFB create(long address) { - return wrap(XrCompositionLayerPassthroughFB.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrCompositionLayerPassthroughFB createSafe(long address) { - return address == NULL ? null : wrap(XrCompositionLayerPassthroughFB.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrCompositionLayerPassthroughFB.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrCompositionLayerPassthroughFB} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrCompositionLayerPassthroughFB malloc(MemoryStack stack) { - return wrap(XrCompositionLayerPassthroughFB.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrCompositionLayerPassthroughFB} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrCompositionLayerPassthroughFB calloc(MemoryStack stack) { - return wrap(XrCompositionLayerPassthroughFB.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrCompositionLayerPassthroughFB.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrCompositionLayerPassthroughFB.NEXT); } - /** Unsafe version of {@link #flags}. */ - public static long nflags(long struct) { return UNSAFE.getLong(null, struct + XrCompositionLayerPassthroughFB.FLAGS); } - /** Unsafe version of {@link #space}. */ - public static long nspace(long struct) { return memGetAddress(struct + XrCompositionLayerPassthroughFB.SPACE); } - /** Unsafe version of {@link #layerHandle}. */ - public static long nlayerHandle(long struct) { return memGetAddress(struct + XrCompositionLayerPassthroughFB.LAYERHANDLE); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrCompositionLayerPassthroughFB.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrCompositionLayerPassthroughFB.NEXT, value); } - /** Unsafe version of {@link #flags(long) flags}. */ - public static void nflags(long struct, long value) { UNSAFE.putLong(null, struct + XrCompositionLayerPassthroughFB.FLAGS, value); } - /** Unsafe version of {@link #space(XrSpace) space}. */ - public static void nspace(long struct, XrSpace value) { memPutAddress(struct + XrCompositionLayerPassthroughFB.SPACE, value.address()); } - /** Unsafe version of {@link #layerHandle(XrPassthroughLayerFB) layerHandle}. */ - public static void nlayerHandle(long struct, XrPassthroughLayerFB value) { memPutAddress(struct + XrCompositionLayerPassthroughFB.LAYERHANDLE, value.address()); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XrCompositionLayerPassthroughFB.SPACE)); - check(memGetAddress(struct + XrCompositionLayerPassthroughFB.LAYERHANDLE)); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrCompositionLayerPassthroughFB} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrCompositionLayerPassthroughFB ELEMENT_FACTORY = XrCompositionLayerPassthroughFB.create(-1L); - - /** - * Creates a new {@code XrCompositionLayerPassthroughFB.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrCompositionLayerPassthroughFB#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrCompositionLayerPassthroughFB getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrCompositionLayerPassthroughFB.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrCompositionLayerPassthroughFB.nnext(address()); } - /** @return the value of the {@code flags} field. */ - @NativeType("XrCompositionLayerFlags") - public long flags() { return XrCompositionLayerPassthroughFB.nflags(address()); } - /** @return the value of the {@code space} field. */ - @NativeType("XrSpace") - public long space() { return XrCompositionLayerPassthroughFB.nspace(address()); } - /** @return the value of the {@code layerHandle} field. */ - @NativeType("XrPassthroughLayerFB") - public long layerHandle() { return XrCompositionLayerPassthroughFB.nlayerHandle(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrCompositionLayerPassthroughFB.ntype(address(), value); return this; } - /** Sets the {@link FBPassthrough#XR_TYPE_COMPOSITION_LAYER_PASSTHROUGH_FB TYPE_COMPOSITION_LAYER_PASSTHROUGH_FB} value to the {@code type} field. */ - public Buffer type$Default() { return type(FBPassthrough.XR_TYPE_COMPOSITION_LAYER_PASSTHROUGH_FB); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrCompositionLayerPassthroughFB.nnext(address(), value); return this; } - /** Sets the specified value to the {@code flags} field. */ - public Buffer flags(@NativeType("XrCompositionLayerFlags") long value) { XrCompositionLayerPassthroughFB.nflags(address(), value); return this; } - /** Sets the specified value to the {@code space} field. */ - public Buffer space(XrSpace value) { XrCompositionLayerPassthroughFB.nspace(address(), value); return this; } - /** Sets the specified value to the {@code layerHandle} field. */ - public Buffer layerHandle(XrPassthroughLayerFB value) { XrCompositionLayerPassthroughFB.nlayerHandle(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrCompositionLayerProjection.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrCompositionLayerProjection.java deleted file mode 100644 index e82e2316..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrCompositionLayerProjection.java +++ /dev/null @@ -1,379 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrCompositionLayerProjection {
- *     XrStructureType type;
- *     void const * next;
- *     XrCompositionLayerFlags layerFlags;
- *     XrSpace space;
- *     uint32_t viewCount;
- *     {@link XrCompositionLayerProjectionView XrCompositionLayerProjectionView} const * views;
- * }
- */ -public class XrCompositionLayerProjection extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - LAYERFLAGS, - SPACE, - VIEWCOUNT, - VIEWS; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(8), - __member(POINTER_SIZE), - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - LAYERFLAGS = layout.offsetof(2); - SPACE = layout.offsetof(3); - VIEWCOUNT = layout.offsetof(4); - VIEWS = layout.offsetof(5); - } - - /** - * Creates a {@code XrCompositionLayerProjection} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrCompositionLayerProjection(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code layerFlags} field. */ - @NativeType("XrCompositionLayerFlags") - public long layerFlags() { return nlayerFlags(address()); } - /** @return the value of the {@code space} field. */ - @NativeType("XrSpace") - public long space() { return nspace(address()); } - /** @return the value of the {@code viewCount} field. */ - @NativeType("uint32_t") - public int viewCount() { return nviewCount(address()); } - /** @return a {@link XrCompositionLayerProjectionView.Buffer} view of the struct array pointed to by the {@code views} field. */ - @NativeType("XrCompositionLayerProjectionView const *") - public XrCompositionLayerProjectionView.Buffer views() { return nviews(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrCompositionLayerProjection type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_COMPOSITION_LAYER_PROJECTION TYPE_COMPOSITION_LAYER_PROJECTION} value to the {@code type} field. */ - public XrCompositionLayerProjection type$Default() { return type(XR10.XR_TYPE_COMPOSITION_LAYER_PROJECTION); } - /** Sets the specified value to the {@code next} field. */ - public XrCompositionLayerProjection next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code layerFlags} field. */ - public XrCompositionLayerProjection layerFlags(@NativeType("XrCompositionLayerFlags") long value) { nlayerFlags(address(), value); return this; } - /** Sets the specified value to the {@code space} field. */ - public XrCompositionLayerProjection space(XrSpace value) { nspace(address(), value); return this; } - /** Sets the address of the specified {@link XrCompositionLayerProjectionView.Buffer} to the {@code views} field. */ - public XrCompositionLayerProjection views(@NativeType("XrCompositionLayerProjectionView const *") XrCompositionLayerProjectionView.Buffer value) { nviews(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrCompositionLayerProjection set( - int type, - long next, - long layerFlags, - XrSpace space, - XrCompositionLayerProjectionView.Buffer views - ) { - type(type); - next(next); - layerFlags(layerFlags); - space(space); - views(views); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrCompositionLayerProjection set(XrCompositionLayerProjection src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrCompositionLayerProjection} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrCompositionLayerProjection malloc() { - return wrap(XrCompositionLayerProjection.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrCompositionLayerProjection} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrCompositionLayerProjection calloc() { - return wrap(XrCompositionLayerProjection.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrCompositionLayerProjection} instance allocated with {@link BufferUtils}. */ - public static XrCompositionLayerProjection create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrCompositionLayerProjection.class, memAddress(container), container); - } - - /** Returns a new {@code XrCompositionLayerProjection} instance for the specified memory address. */ - public static XrCompositionLayerProjection create(long address) { - return wrap(XrCompositionLayerProjection.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrCompositionLayerProjection createSafe(long address) { - return address == NULL ? null : wrap(XrCompositionLayerProjection.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrCompositionLayerProjection.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrCompositionLayerProjection} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrCompositionLayerProjection malloc(MemoryStack stack) { - return wrap(XrCompositionLayerProjection.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrCompositionLayerProjection} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrCompositionLayerProjection calloc(MemoryStack stack) { - return wrap(XrCompositionLayerProjection.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrCompositionLayerProjection.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrCompositionLayerProjection.NEXT); } - /** Unsafe version of {@link #layerFlags}. */ - public static long nlayerFlags(long struct) { return UNSAFE.getLong(null, struct + XrCompositionLayerProjection.LAYERFLAGS); } - /** Unsafe version of {@link #space}. */ - public static long nspace(long struct) { return memGetAddress(struct + XrCompositionLayerProjection.SPACE); } - /** Unsafe version of {@link #viewCount}. */ - public static int nviewCount(long struct) { return UNSAFE.getInt(null, struct + XrCompositionLayerProjection.VIEWCOUNT); } - /** Unsafe version of {@link #views}. */ - public static XrCompositionLayerProjectionView.Buffer nviews(long struct) { return XrCompositionLayerProjectionView.create(memGetAddress(struct + XrCompositionLayerProjection.VIEWS), nviewCount(struct)); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrCompositionLayerProjection.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrCompositionLayerProjection.NEXT, value); } - /** Unsafe version of {@link #layerFlags(long) layerFlags}. */ - public static void nlayerFlags(long struct, long value) { UNSAFE.putLong(null, struct + XrCompositionLayerProjection.LAYERFLAGS, value); } - /** Unsafe version of {@link #space(XrSpace) space}. */ - public static void nspace(long struct, XrSpace value) { memPutAddress(struct + XrCompositionLayerProjection.SPACE, value.address()); } - /** Sets the specified value to the {@code viewCount} field of the specified {@code struct}. */ - public static void nviewCount(long struct, int value) { UNSAFE.putInt(null, struct + XrCompositionLayerProjection.VIEWCOUNT, value); } - /** Unsafe version of {@link #views(XrCompositionLayerProjectionView.Buffer) views}. */ - public static void nviews(long struct, XrCompositionLayerProjectionView.Buffer value) { memPutAddress(struct + XrCompositionLayerProjection.VIEWS, value.address()); nviewCount(struct, value.remaining()); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XrCompositionLayerProjection.SPACE)); - int viewCount = nviewCount(struct); - long views = memGetAddress(struct + XrCompositionLayerProjection.VIEWS); - check(views); - XrCompositionLayerProjectionView.validate(views, viewCount); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrCompositionLayerProjection} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrCompositionLayerProjection ELEMENT_FACTORY = XrCompositionLayerProjection.create(-1L); - - /** - * Creates a new {@code XrCompositionLayerProjection.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrCompositionLayerProjection#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrCompositionLayerProjection getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrCompositionLayerProjection.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrCompositionLayerProjection.nnext(address()); } - /** @return the value of the {@code layerFlags} field. */ - @NativeType("XrCompositionLayerFlags") - public long layerFlags() { return XrCompositionLayerProjection.nlayerFlags(address()); } - /** @return the value of the {@code space} field. */ - @NativeType("XrSpace") - public long space() { return XrCompositionLayerProjection.nspace(address()); } - /** @return the value of the {@code viewCount} field. */ - @NativeType("uint32_t") - public int viewCount() { return XrCompositionLayerProjection.nviewCount(address()); } - /** @return a {@link XrCompositionLayerProjectionView.Buffer} view of the struct array pointed to by the {@code views} field. */ - @NativeType("XrCompositionLayerProjectionView const *") - public XrCompositionLayerProjectionView.Buffer views() { return XrCompositionLayerProjection.nviews(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrCompositionLayerProjection.ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_COMPOSITION_LAYER_PROJECTION TYPE_COMPOSITION_LAYER_PROJECTION} value to the {@code type} field. */ - public Buffer type$Default() { return type(XR10.XR_TYPE_COMPOSITION_LAYER_PROJECTION); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrCompositionLayerProjection.nnext(address(), value); return this; } - /** Sets the specified value to the {@code layerFlags} field. */ - public Buffer layerFlags(@NativeType("XrCompositionLayerFlags") long value) { XrCompositionLayerProjection.nlayerFlags(address(), value); return this; } - /** Sets the specified value to the {@code space} field. */ - public Buffer space(XrSpace value) { XrCompositionLayerProjection.nspace(address(), value); return this; } - /** Sets the address of the specified {@link XrCompositionLayerProjectionView.Buffer} to the {@code views} field. */ - public Buffer views(@NativeType("XrCompositionLayerProjectionView const *") XrCompositionLayerProjectionView.Buffer value) { XrCompositionLayerProjection.nviews(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrCompositionLayerProjectionView.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrCompositionLayerProjectionView.java deleted file mode 100644 index 41ee5343..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrCompositionLayerProjectionView.java +++ /dev/null @@ -1,366 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrCompositionLayerProjectionView {
- *     XrStructureType type;
- *     void const * next;
- *     {@link XrPosef XrPosef} pose;
- *     {@link XrFovf XrFovf} fov;
- *     {@link XrSwapchainSubImage XrSwapchainSubImage} subImage;
- * }
- */ -public class XrCompositionLayerProjectionView extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - POSE, - FOV, - SUBIMAGE; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(XrPosef.SIZEOF, XrPosef.ALIGNOF), - __member(XrFovf.SIZEOF, XrFovf.ALIGNOF), - __member(XrSwapchainSubImage.SIZEOF, XrSwapchainSubImage.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - POSE = layout.offsetof(2); - FOV = layout.offsetof(3); - SUBIMAGE = layout.offsetof(4); - } - - /** - * Creates a {@code XrCompositionLayerProjectionView} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrCompositionLayerProjectionView(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return a {@link XrPosef} view of the {@code pose} field. */ - public XrPosef pose() { return npose(address()); } - /** @return a {@link XrFovf} view of the {@code fov} field. */ - public XrFovf fov() { return nfov(address()); } - /** @return a {@link XrSwapchainSubImage} view of the {@code subImage} field. */ - public XrSwapchainSubImage subImage() { return nsubImage(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrCompositionLayerProjectionView type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_COMPOSITION_LAYER_PROJECTION_VIEW TYPE_COMPOSITION_LAYER_PROJECTION_VIEW} value to the {@code type} field. */ - public XrCompositionLayerProjectionView type$Default() { return type(XR10.XR_TYPE_COMPOSITION_LAYER_PROJECTION_VIEW); } - /** Sets the specified value to the {@code next} field. */ - public XrCompositionLayerProjectionView next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Copies the specified {@link XrPosef} to the {@code pose} field. */ - public XrCompositionLayerProjectionView pose(XrPosef value) { npose(address(), value); return this; } - /** Passes the {@code pose} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrCompositionLayerProjectionView pose(java.util.function.Consumer consumer) { consumer.accept(pose()); return this; } - /** Copies the specified {@link XrFovf} to the {@code fov} field. */ - public XrCompositionLayerProjectionView fov(XrFovf value) { nfov(address(), value); return this; } - /** Passes the {@code fov} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrCompositionLayerProjectionView fov(java.util.function.Consumer consumer) { consumer.accept(fov()); return this; } - /** Copies the specified {@link XrSwapchainSubImage} to the {@code subImage} field. */ - public XrCompositionLayerProjectionView subImage(XrSwapchainSubImage value) { nsubImage(address(), value); return this; } - /** Passes the {@code subImage} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrCompositionLayerProjectionView subImage(java.util.function.Consumer consumer) { consumer.accept(subImage()); return this; } - - /** Initializes this struct with the specified values. */ - public XrCompositionLayerProjectionView set( - int type, - long next, - XrPosef pose, - XrFovf fov, - XrSwapchainSubImage subImage - ) { - type(type); - next(next); - pose(pose); - fov(fov); - subImage(subImage); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrCompositionLayerProjectionView set(XrCompositionLayerProjectionView src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrCompositionLayerProjectionView} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrCompositionLayerProjectionView malloc() { - return wrap(XrCompositionLayerProjectionView.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrCompositionLayerProjectionView} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrCompositionLayerProjectionView calloc() { - return wrap(XrCompositionLayerProjectionView.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrCompositionLayerProjectionView} instance allocated with {@link BufferUtils}. */ - public static XrCompositionLayerProjectionView create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrCompositionLayerProjectionView.class, memAddress(container), container); - } - - /** Returns a new {@code XrCompositionLayerProjectionView} instance for the specified memory address. */ - public static XrCompositionLayerProjectionView create(long address) { - return wrap(XrCompositionLayerProjectionView.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrCompositionLayerProjectionView createSafe(long address) { - return address == NULL ? null : wrap(XrCompositionLayerProjectionView.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrCompositionLayerProjectionView.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrCompositionLayerProjectionView} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrCompositionLayerProjectionView malloc(MemoryStack stack) { - return wrap(XrCompositionLayerProjectionView.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrCompositionLayerProjectionView} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrCompositionLayerProjectionView calloc(MemoryStack stack) { - return wrap(XrCompositionLayerProjectionView.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrCompositionLayerProjectionView.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrCompositionLayerProjectionView.NEXT); } - /** Unsafe version of {@link #pose}. */ - public static XrPosef npose(long struct) { return XrPosef.create(struct + XrCompositionLayerProjectionView.POSE); } - /** Unsafe version of {@link #fov}. */ - public static XrFovf nfov(long struct) { return XrFovf.create(struct + XrCompositionLayerProjectionView.FOV); } - /** Unsafe version of {@link #subImage}. */ - public static XrSwapchainSubImage nsubImage(long struct) { return XrSwapchainSubImage.create(struct + XrCompositionLayerProjectionView.SUBIMAGE); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrCompositionLayerProjectionView.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrCompositionLayerProjectionView.NEXT, value); } - /** Unsafe version of {@link #pose(XrPosef) pose}. */ - public static void npose(long struct, XrPosef value) { memCopy(value.address(), struct + XrCompositionLayerProjectionView.POSE, XrPosef.SIZEOF); } - /** Unsafe version of {@link #fov(XrFovf) fov}. */ - public static void nfov(long struct, XrFovf value) { memCopy(value.address(), struct + XrCompositionLayerProjectionView.FOV, XrFovf.SIZEOF); } - /** Unsafe version of {@link #subImage(XrSwapchainSubImage) subImage}. */ - public static void nsubImage(long struct, XrSwapchainSubImage value) { memCopy(value.address(), struct + XrCompositionLayerProjectionView.SUBIMAGE, XrSwapchainSubImage.SIZEOF); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - XrSwapchainSubImage.validate(struct + XrCompositionLayerProjectionView.SUBIMAGE); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrCompositionLayerProjectionView} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrCompositionLayerProjectionView ELEMENT_FACTORY = XrCompositionLayerProjectionView.create(-1L); - - /** - * Creates a new {@code XrCompositionLayerProjectionView.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrCompositionLayerProjectionView#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrCompositionLayerProjectionView getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrCompositionLayerProjectionView.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrCompositionLayerProjectionView.nnext(address()); } - /** @return a {@link XrPosef} view of the {@code pose} field. */ - public XrPosef pose() { return XrCompositionLayerProjectionView.npose(address()); } - /** @return a {@link XrFovf} view of the {@code fov} field. */ - public XrFovf fov() { return XrCompositionLayerProjectionView.nfov(address()); } - /** @return a {@link XrSwapchainSubImage} view of the {@code subImage} field. */ - public XrSwapchainSubImage subImage() { return XrCompositionLayerProjectionView.nsubImage(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrCompositionLayerProjectionView.ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_COMPOSITION_LAYER_PROJECTION_VIEW TYPE_COMPOSITION_LAYER_PROJECTION_VIEW} value to the {@code type} field. */ - public Buffer type$Default() { return type(XR10.XR_TYPE_COMPOSITION_LAYER_PROJECTION_VIEW); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrCompositionLayerProjectionView.nnext(address(), value); return this; } - /** Copies the specified {@link XrPosef} to the {@code pose} field. */ - public Buffer pose(XrPosef value) { XrCompositionLayerProjectionView.npose(address(), value); return this; } - /** Passes the {@code pose} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer pose(java.util.function.Consumer consumer) { consumer.accept(pose()); return this; } - /** Copies the specified {@link XrFovf} to the {@code fov} field. */ - public Buffer fov(XrFovf value) { XrCompositionLayerProjectionView.nfov(address(), value); return this; } - /** Passes the {@code fov} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer fov(java.util.function.Consumer consumer) { consumer.accept(fov()); return this; } - /** Copies the specified {@link XrSwapchainSubImage} to the {@code subImage} field. */ - public Buffer subImage(XrSwapchainSubImage value) { XrCompositionLayerProjectionView.nsubImage(address(), value); return this; } - /** Passes the {@code subImage} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer subImage(java.util.function.Consumer consumer) { consumer.accept(subImage()); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrCompositionLayerQuad.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrCompositionLayerQuad.java deleted file mode 100644 index 03b14e46..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrCompositionLayerQuad.java +++ /dev/null @@ -1,428 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrCompositionLayerQuad {
- *     XrStructureType type;
- *     void const * next;
- *     XrCompositionLayerFlags layerFlags;
- *     XrSpace space;
- *     XrEyeVisibility eyeVisibility;
- *     {@link XrSwapchainSubImage XrSwapchainSubImage} subImage;
- *     {@link XrPosef XrPosef} pose;
- *     {@link XrExtent2Df XrExtent2Df} size;
- * }
- */ -public class XrCompositionLayerQuad extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - LAYERFLAGS, - SPACE, - EYEVISIBILITY, - SUBIMAGE, - POSE, - SIZE; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(8), - __member(POINTER_SIZE), - __member(4), - __member(XrSwapchainSubImage.SIZEOF, XrSwapchainSubImage.ALIGNOF), - __member(XrPosef.SIZEOF, XrPosef.ALIGNOF), - __member(XrExtent2Df.SIZEOF, XrExtent2Df.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - LAYERFLAGS = layout.offsetof(2); - SPACE = layout.offsetof(3); - EYEVISIBILITY = layout.offsetof(4); - SUBIMAGE = layout.offsetof(5); - POSE = layout.offsetof(6); - SIZE = layout.offsetof(7); - } - - /** - * Creates a {@code XrCompositionLayerQuad} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrCompositionLayerQuad(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code layerFlags} field. */ - @NativeType("XrCompositionLayerFlags") - public long layerFlags() { return nlayerFlags(address()); } - /** @return the value of the {@code space} field. */ - @NativeType("XrSpace") - public long space() { return nspace(address()); } - /** @return the value of the {@code eyeVisibility} field. */ - @NativeType("XrEyeVisibility") - public int eyeVisibility() { return neyeVisibility(address()); } - /** @return a {@link XrSwapchainSubImage} view of the {@code subImage} field. */ - public XrSwapchainSubImage subImage() { return nsubImage(address()); } - /** @return a {@link XrPosef} view of the {@code pose} field. */ - public XrPosef pose() { return npose(address()); } - /** @return a {@link XrExtent2Df} view of the {@code size} field. */ - public XrExtent2Df size() { return nsize(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrCompositionLayerQuad type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_COMPOSITION_LAYER_QUAD TYPE_COMPOSITION_LAYER_QUAD} value to the {@code type} field. */ - public XrCompositionLayerQuad type$Default() { return type(XR10.XR_TYPE_COMPOSITION_LAYER_QUAD); } - /** Sets the specified value to the {@code next} field. */ - public XrCompositionLayerQuad next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code layerFlags} field. */ - public XrCompositionLayerQuad layerFlags(@NativeType("XrCompositionLayerFlags") long value) { nlayerFlags(address(), value); return this; } - /** Sets the specified value to the {@code space} field. */ - public XrCompositionLayerQuad space(XrSpace value) { nspace(address(), value); return this; } - /** Sets the specified value to the {@code eyeVisibility} field. */ - public XrCompositionLayerQuad eyeVisibility(@NativeType("XrEyeVisibility") int value) { neyeVisibility(address(), value); return this; } - /** Copies the specified {@link XrSwapchainSubImage} to the {@code subImage} field. */ - public XrCompositionLayerQuad subImage(XrSwapchainSubImage value) { nsubImage(address(), value); return this; } - /** Passes the {@code subImage} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrCompositionLayerQuad subImage(java.util.function.Consumer consumer) { consumer.accept(subImage()); return this; } - /** Copies the specified {@link XrPosef} to the {@code pose} field. */ - public XrCompositionLayerQuad pose(XrPosef value) { npose(address(), value); return this; } - /** Passes the {@code pose} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrCompositionLayerQuad pose(java.util.function.Consumer consumer) { consumer.accept(pose()); return this; } - /** Copies the specified {@link XrExtent2Df} to the {@code size} field. */ - public XrCompositionLayerQuad size(XrExtent2Df value) { nsize(address(), value); return this; } - /** Passes the {@code size} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrCompositionLayerQuad size(java.util.function.Consumer consumer) { consumer.accept(size()); return this; } - - /** Initializes this struct with the specified values. */ - public XrCompositionLayerQuad set( - int type, - long next, - long layerFlags, - XrSpace space, - int eyeVisibility, - XrSwapchainSubImage subImage, - XrPosef pose, - XrExtent2Df size - ) { - type(type); - next(next); - layerFlags(layerFlags); - space(space); - eyeVisibility(eyeVisibility); - subImage(subImage); - pose(pose); - size(size); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrCompositionLayerQuad set(XrCompositionLayerQuad src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrCompositionLayerQuad} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrCompositionLayerQuad malloc() { - return wrap(XrCompositionLayerQuad.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrCompositionLayerQuad} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrCompositionLayerQuad calloc() { - return wrap(XrCompositionLayerQuad.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrCompositionLayerQuad} instance allocated with {@link BufferUtils}. */ - public static XrCompositionLayerQuad create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrCompositionLayerQuad.class, memAddress(container), container); - } - - /** Returns a new {@code XrCompositionLayerQuad} instance for the specified memory address. */ - public static XrCompositionLayerQuad create(long address) { - return wrap(XrCompositionLayerQuad.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrCompositionLayerQuad createSafe(long address) { - return address == NULL ? null : wrap(XrCompositionLayerQuad.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrCompositionLayerQuad.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrCompositionLayerQuad} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrCompositionLayerQuad malloc(MemoryStack stack) { - return wrap(XrCompositionLayerQuad.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrCompositionLayerQuad} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrCompositionLayerQuad calloc(MemoryStack stack) { - return wrap(XrCompositionLayerQuad.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrCompositionLayerQuad.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrCompositionLayerQuad.NEXT); } - /** Unsafe version of {@link #layerFlags}. */ - public static long nlayerFlags(long struct) { return UNSAFE.getLong(null, struct + XrCompositionLayerQuad.LAYERFLAGS); } - /** Unsafe version of {@link #space}. */ - public static long nspace(long struct) { return memGetAddress(struct + XrCompositionLayerQuad.SPACE); } - /** Unsafe version of {@link #eyeVisibility}. */ - public static int neyeVisibility(long struct) { return UNSAFE.getInt(null, struct + XrCompositionLayerQuad.EYEVISIBILITY); } - /** Unsafe version of {@link #subImage}. */ - public static XrSwapchainSubImage nsubImage(long struct) { return XrSwapchainSubImage.create(struct + XrCompositionLayerQuad.SUBIMAGE); } - /** Unsafe version of {@link #pose}. */ - public static XrPosef npose(long struct) { return XrPosef.create(struct + XrCompositionLayerQuad.POSE); } - /** Unsafe version of {@link #size}. */ - public static XrExtent2Df nsize(long struct) { return XrExtent2Df.create(struct + XrCompositionLayerQuad.SIZE); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrCompositionLayerQuad.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrCompositionLayerQuad.NEXT, value); } - /** Unsafe version of {@link #layerFlags(long) layerFlags}. */ - public static void nlayerFlags(long struct, long value) { UNSAFE.putLong(null, struct + XrCompositionLayerQuad.LAYERFLAGS, value); } - /** Unsafe version of {@link #space(XrSpace) space}. */ - public static void nspace(long struct, XrSpace value) { memPutAddress(struct + XrCompositionLayerQuad.SPACE, value.address()); } - /** Unsafe version of {@link #eyeVisibility(int) eyeVisibility}. */ - public static void neyeVisibility(long struct, int value) { UNSAFE.putInt(null, struct + XrCompositionLayerQuad.EYEVISIBILITY, value); } - /** Unsafe version of {@link #subImage(XrSwapchainSubImage) subImage}. */ - public static void nsubImage(long struct, XrSwapchainSubImage value) { memCopy(value.address(), struct + XrCompositionLayerQuad.SUBIMAGE, XrSwapchainSubImage.SIZEOF); } - /** Unsafe version of {@link #pose(XrPosef) pose}. */ - public static void npose(long struct, XrPosef value) { memCopy(value.address(), struct + XrCompositionLayerQuad.POSE, XrPosef.SIZEOF); } - /** Unsafe version of {@link #size(XrExtent2Df) size}. */ - public static void nsize(long struct, XrExtent2Df value) { memCopy(value.address(), struct + XrCompositionLayerQuad.SIZE, XrExtent2Df.SIZEOF); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XrCompositionLayerQuad.SPACE)); - XrSwapchainSubImage.validate(struct + XrCompositionLayerQuad.SUBIMAGE); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrCompositionLayerQuad} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrCompositionLayerQuad ELEMENT_FACTORY = XrCompositionLayerQuad.create(-1L); - - /** - * Creates a new {@code XrCompositionLayerQuad.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrCompositionLayerQuad#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrCompositionLayerQuad getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrCompositionLayerQuad.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrCompositionLayerQuad.nnext(address()); } - /** @return the value of the {@code layerFlags} field. */ - @NativeType("XrCompositionLayerFlags") - public long layerFlags() { return XrCompositionLayerQuad.nlayerFlags(address()); } - /** @return the value of the {@code space} field. */ - @NativeType("XrSpace") - public long space() { return XrCompositionLayerQuad.nspace(address()); } - /** @return the value of the {@code eyeVisibility} field. */ - @NativeType("XrEyeVisibility") - public int eyeVisibility() { return XrCompositionLayerQuad.neyeVisibility(address()); } - /** @return a {@link XrSwapchainSubImage} view of the {@code subImage} field. */ - public XrSwapchainSubImage subImage() { return XrCompositionLayerQuad.nsubImage(address()); } - /** @return a {@link XrPosef} view of the {@code pose} field. */ - public XrPosef pose() { return XrCompositionLayerQuad.npose(address()); } - /** @return a {@link XrExtent2Df} view of the {@code size} field. */ - public XrExtent2Df size() { return XrCompositionLayerQuad.nsize(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrCompositionLayerQuad.ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_COMPOSITION_LAYER_QUAD TYPE_COMPOSITION_LAYER_QUAD} value to the {@code type} field. */ - public Buffer type$Default() { return type(XR10.XR_TYPE_COMPOSITION_LAYER_QUAD); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrCompositionLayerQuad.nnext(address(), value); return this; } - /** Sets the specified value to the {@code layerFlags} field. */ - public Buffer layerFlags(@NativeType("XrCompositionLayerFlags") long value) { XrCompositionLayerQuad.nlayerFlags(address(), value); return this; } - /** Sets the specified value to the {@code space} field. */ - public Buffer space(XrSpace value) { XrCompositionLayerQuad.nspace(address(), value); return this; } - /** Sets the specified value to the {@code eyeVisibility} field. */ - public Buffer eyeVisibility(@NativeType("XrEyeVisibility") int value) { XrCompositionLayerQuad.neyeVisibility(address(), value); return this; } - /** Copies the specified {@link XrSwapchainSubImage} to the {@code subImage} field. */ - public Buffer subImage(XrSwapchainSubImage value) { XrCompositionLayerQuad.nsubImage(address(), value); return this; } - /** Passes the {@code subImage} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer subImage(java.util.function.Consumer consumer) { consumer.accept(subImage()); return this; } - /** Copies the specified {@link XrPosef} to the {@code pose} field. */ - public Buffer pose(XrPosef value) { XrCompositionLayerQuad.npose(address(), value); return this; } - /** Passes the {@code pose} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer pose(java.util.function.Consumer consumer) { consumer.accept(pose()); return this; } - /** Copies the specified {@link XrExtent2Df} to the {@code size} field. */ - public Buffer size(XrExtent2Df value) { XrCompositionLayerQuad.nsize(address(), value); return this; } - /** Passes the {@code size} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer size(java.util.function.Consumer consumer) { consumer.accept(size()); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrCompositionLayerReprojectionInfoMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrCompositionLayerReprojectionInfoMSFT.java deleted file mode 100644 index 5eb3c735..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrCompositionLayerReprojectionInfoMSFT.java +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrCompositionLayerReprojectionInfoMSFT {
- *     XrStructureType type;
- *     void const * next;
- *     XrReprojectionModeMSFT reprojectionMode;
- * }
- */ -public class XrCompositionLayerReprojectionInfoMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - REPROJECTIONMODE; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - REPROJECTIONMODE = layout.offsetof(2); - } - - /** - * Creates a {@code XrCompositionLayerReprojectionInfoMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrCompositionLayerReprojectionInfoMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code reprojectionMode} field. */ - @NativeType("XrReprojectionModeMSFT") - public int reprojectionMode() { return nreprojectionMode(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrCompositionLayerReprojectionInfoMSFT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link MSFTCompositionLayerReprojection#XR_TYPE_COMPOSITION_LAYER_REPROJECTION_INFO_MSFT TYPE_COMPOSITION_LAYER_REPROJECTION_INFO_MSFT} value to the {@code type} field. */ - public XrCompositionLayerReprojectionInfoMSFT type$Default() { return type(MSFTCompositionLayerReprojection.XR_TYPE_COMPOSITION_LAYER_REPROJECTION_INFO_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public XrCompositionLayerReprojectionInfoMSFT next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code reprojectionMode} field. */ - public XrCompositionLayerReprojectionInfoMSFT reprojectionMode(@NativeType("XrReprojectionModeMSFT") int value) { nreprojectionMode(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrCompositionLayerReprojectionInfoMSFT set( - int type, - long next, - int reprojectionMode - ) { - type(type); - next(next); - reprojectionMode(reprojectionMode); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrCompositionLayerReprojectionInfoMSFT set(XrCompositionLayerReprojectionInfoMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrCompositionLayerReprojectionInfoMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrCompositionLayerReprojectionInfoMSFT malloc() { - return wrap(XrCompositionLayerReprojectionInfoMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrCompositionLayerReprojectionInfoMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrCompositionLayerReprojectionInfoMSFT calloc() { - return wrap(XrCompositionLayerReprojectionInfoMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrCompositionLayerReprojectionInfoMSFT} instance allocated with {@link BufferUtils}. */ - public static XrCompositionLayerReprojectionInfoMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrCompositionLayerReprojectionInfoMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrCompositionLayerReprojectionInfoMSFT} instance for the specified memory address. */ - public static XrCompositionLayerReprojectionInfoMSFT create(long address) { - return wrap(XrCompositionLayerReprojectionInfoMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrCompositionLayerReprojectionInfoMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrCompositionLayerReprojectionInfoMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrCompositionLayerReprojectionInfoMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrCompositionLayerReprojectionInfoMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrCompositionLayerReprojectionInfoMSFT malloc(MemoryStack stack) { - return wrap(XrCompositionLayerReprojectionInfoMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrCompositionLayerReprojectionInfoMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrCompositionLayerReprojectionInfoMSFT calloc(MemoryStack stack) { - return wrap(XrCompositionLayerReprojectionInfoMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrCompositionLayerReprojectionInfoMSFT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrCompositionLayerReprojectionInfoMSFT.NEXT); } - /** Unsafe version of {@link #reprojectionMode}. */ - public static int nreprojectionMode(long struct) { return UNSAFE.getInt(null, struct + XrCompositionLayerReprojectionInfoMSFT.REPROJECTIONMODE); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrCompositionLayerReprojectionInfoMSFT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrCompositionLayerReprojectionInfoMSFT.NEXT, value); } - /** Unsafe version of {@link #reprojectionMode(int) reprojectionMode}. */ - public static void nreprojectionMode(long struct, int value) { UNSAFE.putInt(null, struct + XrCompositionLayerReprojectionInfoMSFT.REPROJECTIONMODE, value); } - - // ----------------------------------- - - /** An array of {@link XrCompositionLayerReprojectionInfoMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrCompositionLayerReprojectionInfoMSFT ELEMENT_FACTORY = XrCompositionLayerReprojectionInfoMSFT.create(-1L); - - /** - * Creates a new {@code XrCompositionLayerReprojectionInfoMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrCompositionLayerReprojectionInfoMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrCompositionLayerReprojectionInfoMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrCompositionLayerReprojectionInfoMSFT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrCompositionLayerReprojectionInfoMSFT.nnext(address()); } - /** @return the value of the {@code reprojectionMode} field. */ - @NativeType("XrReprojectionModeMSFT") - public int reprojectionMode() { return XrCompositionLayerReprojectionInfoMSFT.nreprojectionMode(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrCompositionLayerReprojectionInfoMSFT.ntype(address(), value); return this; } - /** Sets the {@link MSFTCompositionLayerReprojection#XR_TYPE_COMPOSITION_LAYER_REPROJECTION_INFO_MSFT TYPE_COMPOSITION_LAYER_REPROJECTION_INFO_MSFT} value to the {@code type} field. */ - public Buffer type$Default() { return type(MSFTCompositionLayerReprojection.XR_TYPE_COMPOSITION_LAYER_REPROJECTION_INFO_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrCompositionLayerReprojectionInfoMSFT.nnext(address(), value); return this; } - /** Sets the specified value to the {@code reprojectionMode} field. */ - public Buffer reprojectionMode(@NativeType("XrReprojectionModeMSFT") int value) { XrCompositionLayerReprojectionInfoMSFT.nreprojectionMode(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrCompositionLayerReprojectionPlaneOverrideMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrCompositionLayerReprojectionPlaneOverrideMSFT.java deleted file mode 100644 index f1694b4c..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrCompositionLayerReprojectionPlaneOverrideMSFT.java +++ /dev/null @@ -1,345 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrCompositionLayerReprojectionPlaneOverrideMSFT {
- *     XrStructureType type;
- *     void const * next;
- *     {@link XrVector3f XrVector3f} position;
- *     {@link XrVector3f XrVector3f} normal;
- *     {@link XrVector3f XrVector3f} velocity;
- * }
- */ -public class XrCompositionLayerReprojectionPlaneOverrideMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - POSITION, - NORMAL, - VELOCITY; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(XrVector3f.SIZEOF, XrVector3f.ALIGNOF), - __member(XrVector3f.SIZEOF, XrVector3f.ALIGNOF), - __member(XrVector3f.SIZEOF, XrVector3f.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - POSITION = layout.offsetof(2); - NORMAL = layout.offsetof(3); - VELOCITY = layout.offsetof(4); - } - - /** - * Creates a {@code XrCompositionLayerReprojectionPlaneOverrideMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrCompositionLayerReprojectionPlaneOverrideMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return a {@link XrVector3f} view of the {@code position} field. */ - public XrVector3f position$() { return nposition$(address()); } - /** @return a {@link XrVector3f} view of the {@code normal} field. */ - public XrVector3f normal() { return nnormal(address()); } - /** @return a {@link XrVector3f} view of the {@code velocity} field. */ - public XrVector3f velocity() { return nvelocity(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrCompositionLayerReprojectionPlaneOverrideMSFT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link MSFTCompositionLayerReprojection#XR_TYPE_COMPOSITION_LAYER_REPROJECTION_PLANE_OVERRIDE_MSFT TYPE_COMPOSITION_LAYER_REPROJECTION_PLANE_OVERRIDE_MSFT} value to the {@code type} field. */ - public XrCompositionLayerReprojectionPlaneOverrideMSFT type$Default() { return type(MSFTCompositionLayerReprojection.XR_TYPE_COMPOSITION_LAYER_REPROJECTION_PLANE_OVERRIDE_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public XrCompositionLayerReprojectionPlaneOverrideMSFT next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Copies the specified {@link XrVector3f} to the {@code position} field. */ - public XrCompositionLayerReprojectionPlaneOverrideMSFT position$(XrVector3f value) { nposition$(address(), value); return this; } - /** Passes the {@code position} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrCompositionLayerReprojectionPlaneOverrideMSFT position$(java.util.function.Consumer consumer) { consumer.accept(position$()); return this; } - /** Copies the specified {@link XrVector3f} to the {@code normal} field. */ - public XrCompositionLayerReprojectionPlaneOverrideMSFT normal(XrVector3f value) { nnormal(address(), value); return this; } - /** Passes the {@code normal} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrCompositionLayerReprojectionPlaneOverrideMSFT normal(java.util.function.Consumer consumer) { consumer.accept(normal()); return this; } - /** Copies the specified {@link XrVector3f} to the {@code velocity} field. */ - public XrCompositionLayerReprojectionPlaneOverrideMSFT velocity(XrVector3f value) { nvelocity(address(), value); return this; } - /** Passes the {@code velocity} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrCompositionLayerReprojectionPlaneOverrideMSFT velocity(java.util.function.Consumer consumer) { consumer.accept(velocity()); return this; } - - /** Initializes this struct with the specified values. */ - public XrCompositionLayerReprojectionPlaneOverrideMSFT set( - int type, - long next, - XrVector3f position$, - XrVector3f normal, - XrVector3f velocity - ) { - type(type); - next(next); - position$(position$); - normal(normal); - velocity(velocity); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrCompositionLayerReprojectionPlaneOverrideMSFT set(XrCompositionLayerReprojectionPlaneOverrideMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrCompositionLayerReprojectionPlaneOverrideMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrCompositionLayerReprojectionPlaneOverrideMSFT malloc() { - return wrap(XrCompositionLayerReprojectionPlaneOverrideMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrCompositionLayerReprojectionPlaneOverrideMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrCompositionLayerReprojectionPlaneOverrideMSFT calloc() { - return wrap(XrCompositionLayerReprojectionPlaneOverrideMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrCompositionLayerReprojectionPlaneOverrideMSFT} instance allocated with {@link BufferUtils}. */ - public static XrCompositionLayerReprojectionPlaneOverrideMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrCompositionLayerReprojectionPlaneOverrideMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrCompositionLayerReprojectionPlaneOverrideMSFT} instance for the specified memory address. */ - public static XrCompositionLayerReprojectionPlaneOverrideMSFT create(long address) { - return wrap(XrCompositionLayerReprojectionPlaneOverrideMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrCompositionLayerReprojectionPlaneOverrideMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrCompositionLayerReprojectionPlaneOverrideMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrCompositionLayerReprojectionPlaneOverrideMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrCompositionLayerReprojectionPlaneOverrideMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrCompositionLayerReprojectionPlaneOverrideMSFT malloc(MemoryStack stack) { - return wrap(XrCompositionLayerReprojectionPlaneOverrideMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrCompositionLayerReprojectionPlaneOverrideMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrCompositionLayerReprojectionPlaneOverrideMSFT calloc(MemoryStack stack) { - return wrap(XrCompositionLayerReprojectionPlaneOverrideMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrCompositionLayerReprojectionPlaneOverrideMSFT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrCompositionLayerReprojectionPlaneOverrideMSFT.NEXT); } - /** Unsafe version of {@link #position$}. */ - public static XrVector3f nposition$(long struct) { return XrVector3f.create(struct + XrCompositionLayerReprojectionPlaneOverrideMSFT.POSITION); } - /** Unsafe version of {@link #normal}. */ - public static XrVector3f nnormal(long struct) { return XrVector3f.create(struct + XrCompositionLayerReprojectionPlaneOverrideMSFT.NORMAL); } - /** Unsafe version of {@link #velocity}. */ - public static XrVector3f nvelocity(long struct) { return XrVector3f.create(struct + XrCompositionLayerReprojectionPlaneOverrideMSFT.VELOCITY); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrCompositionLayerReprojectionPlaneOverrideMSFT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrCompositionLayerReprojectionPlaneOverrideMSFT.NEXT, value); } - /** Unsafe version of {@link #position$(XrVector3f) position$}. */ - public static void nposition$(long struct, XrVector3f value) { memCopy(value.address(), struct + XrCompositionLayerReprojectionPlaneOverrideMSFT.POSITION, XrVector3f.SIZEOF); } - /** Unsafe version of {@link #normal(XrVector3f) normal}. */ - public static void nnormal(long struct, XrVector3f value) { memCopy(value.address(), struct + XrCompositionLayerReprojectionPlaneOverrideMSFT.NORMAL, XrVector3f.SIZEOF); } - /** Unsafe version of {@link #velocity(XrVector3f) velocity}. */ - public static void nvelocity(long struct, XrVector3f value) { memCopy(value.address(), struct + XrCompositionLayerReprojectionPlaneOverrideMSFT.VELOCITY, XrVector3f.SIZEOF); } - - // ----------------------------------- - - /** An array of {@link XrCompositionLayerReprojectionPlaneOverrideMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrCompositionLayerReprojectionPlaneOverrideMSFT ELEMENT_FACTORY = XrCompositionLayerReprojectionPlaneOverrideMSFT.create(-1L); - - /** - * Creates a new {@code XrCompositionLayerReprojectionPlaneOverrideMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrCompositionLayerReprojectionPlaneOverrideMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrCompositionLayerReprojectionPlaneOverrideMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrCompositionLayerReprojectionPlaneOverrideMSFT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrCompositionLayerReprojectionPlaneOverrideMSFT.nnext(address()); } - /** @return a {@link XrVector3f} view of the {@code position} field. */ - public XrVector3f position$() { return XrCompositionLayerReprojectionPlaneOverrideMSFT.nposition$(address()); } - /** @return a {@link XrVector3f} view of the {@code normal} field. */ - public XrVector3f normal() { return XrCompositionLayerReprojectionPlaneOverrideMSFT.nnormal(address()); } - /** @return a {@link XrVector3f} view of the {@code velocity} field. */ - public XrVector3f velocity() { return XrCompositionLayerReprojectionPlaneOverrideMSFT.nvelocity(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrCompositionLayerReprojectionPlaneOverrideMSFT.ntype(address(), value); return this; } - /** Sets the {@link MSFTCompositionLayerReprojection#XR_TYPE_COMPOSITION_LAYER_REPROJECTION_PLANE_OVERRIDE_MSFT TYPE_COMPOSITION_LAYER_REPROJECTION_PLANE_OVERRIDE_MSFT} value to the {@code type} field. */ - public Buffer type$Default() { return type(MSFTCompositionLayerReprojection.XR_TYPE_COMPOSITION_LAYER_REPROJECTION_PLANE_OVERRIDE_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrCompositionLayerReprojectionPlaneOverrideMSFT.nnext(address(), value); return this; } - /** Copies the specified {@link XrVector3f} to the {@code position} field. */ - public Buffer position$(XrVector3f value) { XrCompositionLayerReprojectionPlaneOverrideMSFT.nposition$(address(), value); return this; } - /** Passes the {@code position} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer position$(java.util.function.Consumer consumer) { consumer.accept(position$()); return this; } - /** Copies the specified {@link XrVector3f} to the {@code normal} field. */ - public Buffer normal(XrVector3f value) { XrCompositionLayerReprojectionPlaneOverrideMSFT.nnormal(address(), value); return this; } - /** Passes the {@code normal} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer normal(java.util.function.Consumer consumer) { consumer.accept(normal()); return this; } - /** Copies the specified {@link XrVector3f} to the {@code velocity} field. */ - public Buffer velocity(XrVector3f value) { XrCompositionLayerReprojectionPlaneOverrideMSFT.nvelocity(address(), value); return this; } - /** Passes the {@code velocity} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer velocity(java.util.function.Consumer consumer) { consumer.accept(velocity()); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrCompositionLayerSecureContentFB.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrCompositionLayerSecureContentFB.java deleted file mode 100644 index 0ea152b5..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrCompositionLayerSecureContentFB.java +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrCompositionLayerSecureContentFB {
- *     XrStructureType type;
- *     void const * next;
- *     XrCompositionLayerSecureContentFlagsFB flags;
- * }
- */ -public class XrCompositionLayerSecureContentFB extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - FLAGS; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(8) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - FLAGS = layout.offsetof(2); - } - - /** - * Creates a {@code XrCompositionLayerSecureContentFB} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrCompositionLayerSecureContentFB(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code flags} field. */ - @NativeType("XrCompositionLayerSecureContentFlagsFB") - public long flags() { return nflags(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrCompositionLayerSecureContentFB type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link FBCompositionLayerSecureContent#XR_TYPE_COMPOSITION_LAYER_SECURE_CONTENT_FB TYPE_COMPOSITION_LAYER_SECURE_CONTENT_FB} value to the {@code type} field. */ - public XrCompositionLayerSecureContentFB type$Default() { return type(FBCompositionLayerSecureContent.XR_TYPE_COMPOSITION_LAYER_SECURE_CONTENT_FB); } - /** Sets the specified value to the {@code next} field. */ - public XrCompositionLayerSecureContentFB next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code flags} field. */ - public XrCompositionLayerSecureContentFB flags(@NativeType("XrCompositionLayerSecureContentFlagsFB") long value) { nflags(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrCompositionLayerSecureContentFB set( - int type, - long next, - long flags - ) { - type(type); - next(next); - flags(flags); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrCompositionLayerSecureContentFB set(XrCompositionLayerSecureContentFB src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrCompositionLayerSecureContentFB} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrCompositionLayerSecureContentFB malloc() { - return wrap(XrCompositionLayerSecureContentFB.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrCompositionLayerSecureContentFB} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrCompositionLayerSecureContentFB calloc() { - return wrap(XrCompositionLayerSecureContentFB.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrCompositionLayerSecureContentFB} instance allocated with {@link BufferUtils}. */ - public static XrCompositionLayerSecureContentFB create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrCompositionLayerSecureContentFB.class, memAddress(container), container); - } - - /** Returns a new {@code XrCompositionLayerSecureContentFB} instance for the specified memory address. */ - public static XrCompositionLayerSecureContentFB create(long address) { - return wrap(XrCompositionLayerSecureContentFB.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrCompositionLayerSecureContentFB createSafe(long address) { - return address == NULL ? null : wrap(XrCompositionLayerSecureContentFB.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrCompositionLayerSecureContentFB.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrCompositionLayerSecureContentFB} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrCompositionLayerSecureContentFB malloc(MemoryStack stack) { - return wrap(XrCompositionLayerSecureContentFB.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrCompositionLayerSecureContentFB} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrCompositionLayerSecureContentFB calloc(MemoryStack stack) { - return wrap(XrCompositionLayerSecureContentFB.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrCompositionLayerSecureContentFB.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrCompositionLayerSecureContentFB.NEXT); } - /** Unsafe version of {@link #flags}. */ - public static long nflags(long struct) { return UNSAFE.getLong(null, struct + XrCompositionLayerSecureContentFB.FLAGS); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrCompositionLayerSecureContentFB.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrCompositionLayerSecureContentFB.NEXT, value); } - /** Unsafe version of {@link #flags(long) flags}. */ - public static void nflags(long struct, long value) { UNSAFE.putLong(null, struct + XrCompositionLayerSecureContentFB.FLAGS, value); } - - // ----------------------------------- - - /** An array of {@link XrCompositionLayerSecureContentFB} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrCompositionLayerSecureContentFB ELEMENT_FACTORY = XrCompositionLayerSecureContentFB.create(-1L); - - /** - * Creates a new {@code XrCompositionLayerSecureContentFB.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrCompositionLayerSecureContentFB#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrCompositionLayerSecureContentFB getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrCompositionLayerSecureContentFB.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrCompositionLayerSecureContentFB.nnext(address()); } - /** @return the value of the {@code flags} field. */ - @NativeType("XrCompositionLayerSecureContentFlagsFB") - public long flags() { return XrCompositionLayerSecureContentFB.nflags(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrCompositionLayerSecureContentFB.ntype(address(), value); return this; } - /** Sets the {@link FBCompositionLayerSecureContent#XR_TYPE_COMPOSITION_LAYER_SECURE_CONTENT_FB TYPE_COMPOSITION_LAYER_SECURE_CONTENT_FB} value to the {@code type} field. */ - public Buffer type$Default() { return type(FBCompositionLayerSecureContent.XR_TYPE_COMPOSITION_LAYER_SECURE_CONTENT_FB); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrCompositionLayerSecureContentFB.nnext(address(), value); return this; } - /** Sets the specified value to the {@code flags} field. */ - public Buffer flags(@NativeType("XrCompositionLayerSecureContentFlagsFB") long value) { XrCompositionLayerSecureContentFB.nflags(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrCompositionLayerSpaceWarpInfoFB.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrCompositionLayerSpaceWarpInfoFB.java deleted file mode 100644 index c9e225ec..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrCompositionLayerSpaceWarpInfoFB.java +++ /dev/null @@ -1,459 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrCompositionLayerSpaceWarpInfoFB {
- *     XrStructureType type;
- *     void const * next;
- *     XrCompositionLayerSpaceWarpInfoFlagsFB layerFlags;
- *     {@link XrSwapchainSubImage XrSwapchainSubImage} motionVectorSubImage;
- *     {@link XrPosef XrPosef} appSpaceDeltaPose;
- *     {@link XrSwapchainSubImage XrSwapchainSubImage} depthSubImage;
- *     float minDepth;
- *     float maxDepth;
- *     float nearZ;
- *     float farZ;
- * }
- */ -public class XrCompositionLayerSpaceWarpInfoFB extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - LAYERFLAGS, - MOTIONVECTORSUBIMAGE, - APPSPACEDELTAPOSE, - DEPTHSUBIMAGE, - MINDEPTH, - MAXDEPTH, - NEARZ, - FARZ; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(8), - __member(XrSwapchainSubImage.SIZEOF, XrSwapchainSubImage.ALIGNOF), - __member(XrPosef.SIZEOF, XrPosef.ALIGNOF), - __member(XrSwapchainSubImage.SIZEOF, XrSwapchainSubImage.ALIGNOF), - __member(4), - __member(4), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - LAYERFLAGS = layout.offsetof(2); - MOTIONVECTORSUBIMAGE = layout.offsetof(3); - APPSPACEDELTAPOSE = layout.offsetof(4); - DEPTHSUBIMAGE = layout.offsetof(5); - MINDEPTH = layout.offsetof(6); - MAXDEPTH = layout.offsetof(7); - NEARZ = layout.offsetof(8); - FARZ = layout.offsetof(9); - } - - /** - * Creates a {@code XrCompositionLayerSpaceWarpInfoFB} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrCompositionLayerSpaceWarpInfoFB(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code layerFlags} field. */ - @NativeType("XrCompositionLayerSpaceWarpInfoFlagsFB") - public long layerFlags() { return nlayerFlags(address()); } - /** @return a {@link XrSwapchainSubImage} view of the {@code motionVectorSubImage} field. */ - public XrSwapchainSubImage motionVectorSubImage() { return nmotionVectorSubImage(address()); } - /** @return a {@link XrPosef} view of the {@code appSpaceDeltaPose} field. */ - public XrPosef appSpaceDeltaPose() { return nappSpaceDeltaPose(address()); } - /** @return a {@link XrSwapchainSubImage} view of the {@code depthSubImage} field. */ - public XrSwapchainSubImage depthSubImage() { return ndepthSubImage(address()); } - /** @return the value of the {@code minDepth} field. */ - public float minDepth() { return nminDepth(address()); } - /** @return the value of the {@code maxDepth} field. */ - public float maxDepth() { return nmaxDepth(address()); } - /** @return the value of the {@code nearZ} field. */ - public float nearZ() { return nnearZ(address()); } - /** @return the value of the {@code farZ} field. */ - public float farZ() { return nfarZ(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrCompositionLayerSpaceWarpInfoFB type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link FBSpaceWarp#XR_TYPE_COMPOSITION_LAYER_SPACE_WARP_INFO_FB TYPE_COMPOSITION_LAYER_SPACE_WARP_INFO_FB} value to the {@code type} field. */ - public XrCompositionLayerSpaceWarpInfoFB type$Default() { return type(FBSpaceWarp.XR_TYPE_COMPOSITION_LAYER_SPACE_WARP_INFO_FB); } - /** Sets the specified value to the {@code next} field. */ - public XrCompositionLayerSpaceWarpInfoFB next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code layerFlags} field. */ - public XrCompositionLayerSpaceWarpInfoFB layerFlags(@NativeType("XrCompositionLayerSpaceWarpInfoFlagsFB") long value) { nlayerFlags(address(), value); return this; } - /** Copies the specified {@link XrSwapchainSubImage} to the {@code motionVectorSubImage} field. */ - public XrCompositionLayerSpaceWarpInfoFB motionVectorSubImage(XrSwapchainSubImage value) { nmotionVectorSubImage(address(), value); return this; } - /** Passes the {@code motionVectorSubImage} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrCompositionLayerSpaceWarpInfoFB motionVectorSubImage(java.util.function.Consumer consumer) { consumer.accept(motionVectorSubImage()); return this; } - /** Copies the specified {@link XrPosef} to the {@code appSpaceDeltaPose} field. */ - public XrCompositionLayerSpaceWarpInfoFB appSpaceDeltaPose(XrPosef value) { nappSpaceDeltaPose(address(), value); return this; } - /** Passes the {@code appSpaceDeltaPose} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrCompositionLayerSpaceWarpInfoFB appSpaceDeltaPose(java.util.function.Consumer consumer) { consumer.accept(appSpaceDeltaPose()); return this; } - /** Copies the specified {@link XrSwapchainSubImage} to the {@code depthSubImage} field. */ - public XrCompositionLayerSpaceWarpInfoFB depthSubImage(XrSwapchainSubImage value) { ndepthSubImage(address(), value); return this; } - /** Passes the {@code depthSubImage} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrCompositionLayerSpaceWarpInfoFB depthSubImage(java.util.function.Consumer consumer) { consumer.accept(depthSubImage()); return this; } - /** Sets the specified value to the {@code minDepth} field. */ - public XrCompositionLayerSpaceWarpInfoFB minDepth(float value) { nminDepth(address(), value); return this; } - /** Sets the specified value to the {@code maxDepth} field. */ - public XrCompositionLayerSpaceWarpInfoFB maxDepth(float value) { nmaxDepth(address(), value); return this; } - /** Sets the specified value to the {@code nearZ} field. */ - public XrCompositionLayerSpaceWarpInfoFB nearZ(float value) { nnearZ(address(), value); return this; } - /** Sets the specified value to the {@code farZ} field. */ - public XrCompositionLayerSpaceWarpInfoFB farZ(float value) { nfarZ(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrCompositionLayerSpaceWarpInfoFB set( - int type, - long next, - long layerFlags, - XrSwapchainSubImage motionVectorSubImage, - XrPosef appSpaceDeltaPose, - XrSwapchainSubImage depthSubImage, - float minDepth, - float maxDepth, - float nearZ, - float farZ - ) { - type(type); - next(next); - layerFlags(layerFlags); - motionVectorSubImage(motionVectorSubImage); - appSpaceDeltaPose(appSpaceDeltaPose); - depthSubImage(depthSubImage); - minDepth(minDepth); - maxDepth(maxDepth); - nearZ(nearZ); - farZ(farZ); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrCompositionLayerSpaceWarpInfoFB set(XrCompositionLayerSpaceWarpInfoFB src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrCompositionLayerSpaceWarpInfoFB} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrCompositionLayerSpaceWarpInfoFB malloc() { - return wrap(XrCompositionLayerSpaceWarpInfoFB.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrCompositionLayerSpaceWarpInfoFB} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrCompositionLayerSpaceWarpInfoFB calloc() { - return wrap(XrCompositionLayerSpaceWarpInfoFB.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrCompositionLayerSpaceWarpInfoFB} instance allocated with {@link BufferUtils}. */ - public static XrCompositionLayerSpaceWarpInfoFB create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrCompositionLayerSpaceWarpInfoFB.class, memAddress(container), container); - } - - /** Returns a new {@code XrCompositionLayerSpaceWarpInfoFB} instance for the specified memory address. */ - public static XrCompositionLayerSpaceWarpInfoFB create(long address) { - return wrap(XrCompositionLayerSpaceWarpInfoFB.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrCompositionLayerSpaceWarpInfoFB createSafe(long address) { - return address == NULL ? null : wrap(XrCompositionLayerSpaceWarpInfoFB.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrCompositionLayerSpaceWarpInfoFB.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrCompositionLayerSpaceWarpInfoFB} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrCompositionLayerSpaceWarpInfoFB malloc(MemoryStack stack) { - return wrap(XrCompositionLayerSpaceWarpInfoFB.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrCompositionLayerSpaceWarpInfoFB} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrCompositionLayerSpaceWarpInfoFB calloc(MemoryStack stack) { - return wrap(XrCompositionLayerSpaceWarpInfoFB.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrCompositionLayerSpaceWarpInfoFB.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrCompositionLayerSpaceWarpInfoFB.NEXT); } - /** Unsafe version of {@link #layerFlags}. */ - public static long nlayerFlags(long struct) { return UNSAFE.getLong(null, struct + XrCompositionLayerSpaceWarpInfoFB.LAYERFLAGS); } - /** Unsafe version of {@link #motionVectorSubImage}. */ - public static XrSwapchainSubImage nmotionVectorSubImage(long struct) { return XrSwapchainSubImage.create(struct + XrCompositionLayerSpaceWarpInfoFB.MOTIONVECTORSUBIMAGE); } - /** Unsafe version of {@link #appSpaceDeltaPose}. */ - public static XrPosef nappSpaceDeltaPose(long struct) { return XrPosef.create(struct + XrCompositionLayerSpaceWarpInfoFB.APPSPACEDELTAPOSE); } - /** Unsafe version of {@link #depthSubImage}. */ - public static XrSwapchainSubImage ndepthSubImage(long struct) { return XrSwapchainSubImage.create(struct + XrCompositionLayerSpaceWarpInfoFB.DEPTHSUBIMAGE); } - /** Unsafe version of {@link #minDepth}. */ - public static float nminDepth(long struct) { return UNSAFE.getFloat(null, struct + XrCompositionLayerSpaceWarpInfoFB.MINDEPTH); } - /** Unsafe version of {@link #maxDepth}. */ - public static float nmaxDepth(long struct) { return UNSAFE.getFloat(null, struct + XrCompositionLayerSpaceWarpInfoFB.MAXDEPTH); } - /** Unsafe version of {@link #nearZ}. */ - public static float nnearZ(long struct) { return UNSAFE.getFloat(null, struct + XrCompositionLayerSpaceWarpInfoFB.NEARZ); } - /** Unsafe version of {@link #farZ}. */ - public static float nfarZ(long struct) { return UNSAFE.getFloat(null, struct + XrCompositionLayerSpaceWarpInfoFB.FARZ); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrCompositionLayerSpaceWarpInfoFB.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrCompositionLayerSpaceWarpInfoFB.NEXT, value); } - /** Unsafe version of {@link #layerFlags(long) layerFlags}. */ - public static void nlayerFlags(long struct, long value) { UNSAFE.putLong(null, struct + XrCompositionLayerSpaceWarpInfoFB.LAYERFLAGS, value); } - /** Unsafe version of {@link #motionVectorSubImage(XrSwapchainSubImage) motionVectorSubImage}. */ - public static void nmotionVectorSubImage(long struct, XrSwapchainSubImage value) { memCopy(value.address(), struct + XrCompositionLayerSpaceWarpInfoFB.MOTIONVECTORSUBIMAGE, XrSwapchainSubImage.SIZEOF); } - /** Unsafe version of {@link #appSpaceDeltaPose(XrPosef) appSpaceDeltaPose}. */ - public static void nappSpaceDeltaPose(long struct, XrPosef value) { memCopy(value.address(), struct + XrCompositionLayerSpaceWarpInfoFB.APPSPACEDELTAPOSE, XrPosef.SIZEOF); } - /** Unsafe version of {@link #depthSubImage(XrSwapchainSubImage) depthSubImage}. */ - public static void ndepthSubImage(long struct, XrSwapchainSubImage value) { memCopy(value.address(), struct + XrCompositionLayerSpaceWarpInfoFB.DEPTHSUBIMAGE, XrSwapchainSubImage.SIZEOF); } - /** Unsafe version of {@link #minDepth(float) minDepth}. */ - public static void nminDepth(long struct, float value) { UNSAFE.putFloat(null, struct + XrCompositionLayerSpaceWarpInfoFB.MINDEPTH, value); } - /** Unsafe version of {@link #maxDepth(float) maxDepth}. */ - public static void nmaxDepth(long struct, float value) { UNSAFE.putFloat(null, struct + XrCompositionLayerSpaceWarpInfoFB.MAXDEPTH, value); } - /** Unsafe version of {@link #nearZ(float) nearZ}. */ - public static void nnearZ(long struct, float value) { UNSAFE.putFloat(null, struct + XrCompositionLayerSpaceWarpInfoFB.NEARZ, value); } - /** Unsafe version of {@link #farZ(float) farZ}. */ - public static void nfarZ(long struct, float value) { UNSAFE.putFloat(null, struct + XrCompositionLayerSpaceWarpInfoFB.FARZ, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - XrSwapchainSubImage.validate(struct + XrCompositionLayerSpaceWarpInfoFB.MOTIONVECTORSUBIMAGE); - XrSwapchainSubImage.validate(struct + XrCompositionLayerSpaceWarpInfoFB.DEPTHSUBIMAGE); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrCompositionLayerSpaceWarpInfoFB} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrCompositionLayerSpaceWarpInfoFB ELEMENT_FACTORY = XrCompositionLayerSpaceWarpInfoFB.create(-1L); - - /** - * Creates a new {@code XrCompositionLayerSpaceWarpInfoFB.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrCompositionLayerSpaceWarpInfoFB#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrCompositionLayerSpaceWarpInfoFB getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrCompositionLayerSpaceWarpInfoFB.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrCompositionLayerSpaceWarpInfoFB.nnext(address()); } - /** @return the value of the {@code layerFlags} field. */ - @NativeType("XrCompositionLayerSpaceWarpInfoFlagsFB") - public long layerFlags() { return XrCompositionLayerSpaceWarpInfoFB.nlayerFlags(address()); } - /** @return a {@link XrSwapchainSubImage} view of the {@code motionVectorSubImage} field. */ - public XrSwapchainSubImage motionVectorSubImage() { return XrCompositionLayerSpaceWarpInfoFB.nmotionVectorSubImage(address()); } - /** @return a {@link XrPosef} view of the {@code appSpaceDeltaPose} field. */ - public XrPosef appSpaceDeltaPose() { return XrCompositionLayerSpaceWarpInfoFB.nappSpaceDeltaPose(address()); } - /** @return a {@link XrSwapchainSubImage} view of the {@code depthSubImage} field. */ - public XrSwapchainSubImage depthSubImage() { return XrCompositionLayerSpaceWarpInfoFB.ndepthSubImage(address()); } - /** @return the value of the {@code minDepth} field. */ - public float minDepth() { return XrCompositionLayerSpaceWarpInfoFB.nminDepth(address()); } - /** @return the value of the {@code maxDepth} field. */ - public float maxDepth() { return XrCompositionLayerSpaceWarpInfoFB.nmaxDepth(address()); } - /** @return the value of the {@code nearZ} field. */ - public float nearZ() { return XrCompositionLayerSpaceWarpInfoFB.nnearZ(address()); } - /** @return the value of the {@code farZ} field. */ - public float farZ() { return XrCompositionLayerSpaceWarpInfoFB.nfarZ(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrCompositionLayerSpaceWarpInfoFB.ntype(address(), value); return this; } - /** Sets the {@link FBSpaceWarp#XR_TYPE_COMPOSITION_LAYER_SPACE_WARP_INFO_FB TYPE_COMPOSITION_LAYER_SPACE_WARP_INFO_FB} value to the {@code type} field. */ - public Buffer type$Default() { return type(FBSpaceWarp.XR_TYPE_COMPOSITION_LAYER_SPACE_WARP_INFO_FB); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrCompositionLayerSpaceWarpInfoFB.nnext(address(), value); return this; } - /** Sets the specified value to the {@code layerFlags} field. */ - public Buffer layerFlags(@NativeType("XrCompositionLayerSpaceWarpInfoFlagsFB") long value) { XrCompositionLayerSpaceWarpInfoFB.nlayerFlags(address(), value); return this; } - /** Copies the specified {@link XrSwapchainSubImage} to the {@code motionVectorSubImage} field. */ - public Buffer motionVectorSubImage(XrSwapchainSubImage value) { XrCompositionLayerSpaceWarpInfoFB.nmotionVectorSubImage(address(), value); return this; } - /** Passes the {@code motionVectorSubImage} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer motionVectorSubImage(java.util.function.Consumer consumer) { consumer.accept(motionVectorSubImage()); return this; } - /** Copies the specified {@link XrPosef} to the {@code appSpaceDeltaPose} field. */ - public Buffer appSpaceDeltaPose(XrPosef value) { XrCompositionLayerSpaceWarpInfoFB.nappSpaceDeltaPose(address(), value); return this; } - /** Passes the {@code appSpaceDeltaPose} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer appSpaceDeltaPose(java.util.function.Consumer consumer) { consumer.accept(appSpaceDeltaPose()); return this; } - /** Copies the specified {@link XrSwapchainSubImage} to the {@code depthSubImage} field. */ - public Buffer depthSubImage(XrSwapchainSubImage value) { XrCompositionLayerSpaceWarpInfoFB.ndepthSubImage(address(), value); return this; } - /** Passes the {@code depthSubImage} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer depthSubImage(java.util.function.Consumer consumer) { consumer.accept(depthSubImage()); return this; } - /** Sets the specified value to the {@code minDepth} field. */ - public Buffer minDepth(float value) { XrCompositionLayerSpaceWarpInfoFB.nminDepth(address(), value); return this; } - /** Sets the specified value to the {@code maxDepth} field. */ - public Buffer maxDepth(float value) { XrCompositionLayerSpaceWarpInfoFB.nmaxDepth(address(), value); return this; } - /** Sets the specified value to the {@code nearZ} field. */ - public Buffer nearZ(float value) { XrCompositionLayerSpaceWarpInfoFB.nnearZ(address(), value); return this; } - /** Sets the specified value to the {@code farZ} field. */ - public Buffer farZ(float value) { XrCompositionLayerSpaceWarpInfoFB.nfarZ(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrControllerModelKeyStateMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrControllerModelKeyStateMSFT.java deleted file mode 100644 index 4304ac75..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrControllerModelKeyStateMSFT.java +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrControllerModelKeyStateMSFT {
- *     XrStructureType type;
- *     void * next;
- *     XrControllerModelKeyMSFT modelKey;
- * }
- */ -public class XrControllerModelKeyStateMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - MODELKEY; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(8) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - MODELKEY = layout.offsetof(2); - } - - /** - * Creates a {@code XrControllerModelKeyStateMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrControllerModelKeyStateMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return the value of the {@code modelKey} field. */ - @NativeType("XrControllerModelKeyMSFT") - public long modelKey() { return nmodelKey(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrControllerModelKeyStateMSFT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link MSFTControllerModel#XR_TYPE_CONTROLLER_MODEL_KEY_STATE_MSFT TYPE_CONTROLLER_MODEL_KEY_STATE_MSFT} value to the {@code type} field. */ - public XrControllerModelKeyStateMSFT type$Default() { return type(MSFTControllerModel.XR_TYPE_CONTROLLER_MODEL_KEY_STATE_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public XrControllerModelKeyStateMSFT next(@NativeType("void *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code modelKey} field. */ - public XrControllerModelKeyStateMSFT modelKey(@NativeType("XrControllerModelKeyMSFT") long value) { nmodelKey(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrControllerModelKeyStateMSFT set( - int type, - long next, - long modelKey - ) { - type(type); - next(next); - modelKey(modelKey); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrControllerModelKeyStateMSFT set(XrControllerModelKeyStateMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrControllerModelKeyStateMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrControllerModelKeyStateMSFT malloc() { - return wrap(XrControllerModelKeyStateMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrControllerModelKeyStateMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrControllerModelKeyStateMSFT calloc() { - return wrap(XrControllerModelKeyStateMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrControllerModelKeyStateMSFT} instance allocated with {@link BufferUtils}. */ - public static XrControllerModelKeyStateMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrControllerModelKeyStateMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrControllerModelKeyStateMSFT} instance for the specified memory address. */ - public static XrControllerModelKeyStateMSFT create(long address) { - return wrap(XrControllerModelKeyStateMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrControllerModelKeyStateMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrControllerModelKeyStateMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrControllerModelKeyStateMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrControllerModelKeyStateMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrControllerModelKeyStateMSFT malloc(MemoryStack stack) { - return wrap(XrControllerModelKeyStateMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrControllerModelKeyStateMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrControllerModelKeyStateMSFT calloc(MemoryStack stack) { - return wrap(XrControllerModelKeyStateMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrControllerModelKeyStateMSFT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrControllerModelKeyStateMSFT.NEXT); } - /** Unsafe version of {@link #modelKey}. */ - public static long nmodelKey(long struct) { return UNSAFE.getLong(null, struct + XrControllerModelKeyStateMSFT.MODELKEY); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrControllerModelKeyStateMSFT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrControllerModelKeyStateMSFT.NEXT, value); } - /** Unsafe version of {@link #modelKey(long) modelKey}. */ - public static void nmodelKey(long struct, long value) { UNSAFE.putLong(null, struct + XrControllerModelKeyStateMSFT.MODELKEY, value); } - - // ----------------------------------- - - /** An array of {@link XrControllerModelKeyStateMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrControllerModelKeyStateMSFT ELEMENT_FACTORY = XrControllerModelKeyStateMSFT.create(-1L); - - /** - * Creates a new {@code XrControllerModelKeyStateMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrControllerModelKeyStateMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrControllerModelKeyStateMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrControllerModelKeyStateMSFT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrControllerModelKeyStateMSFT.nnext(address()); } - /** @return the value of the {@code modelKey} field. */ - @NativeType("XrControllerModelKeyMSFT") - public long modelKey() { return XrControllerModelKeyStateMSFT.nmodelKey(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrControllerModelKeyStateMSFT.ntype(address(), value); return this; } - /** Sets the {@link MSFTControllerModel#XR_TYPE_CONTROLLER_MODEL_KEY_STATE_MSFT TYPE_CONTROLLER_MODEL_KEY_STATE_MSFT} value to the {@code type} field. */ - public Buffer type$Default() { return type(MSFTControllerModel.XR_TYPE_CONTROLLER_MODEL_KEY_STATE_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrControllerModelKeyStateMSFT.nnext(address(), value); return this; } - /** Sets the specified value to the {@code modelKey} field. */ - public Buffer modelKey(@NativeType("XrControllerModelKeyMSFT") long value) { XrControllerModelKeyStateMSFT.nmodelKey(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrControllerModelNodePropertiesMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrControllerModelNodePropertiesMSFT.java deleted file mode 100644 index 8c91d049..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrControllerModelNodePropertiesMSFT.java +++ /dev/null @@ -1,349 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.openxr.MSFTControllerModel.XR_MAX_CONTROLLER_MODEL_NODE_NAME_SIZE_MSFT; -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrControllerModelNodePropertiesMSFT {
- *     XrStructureType type;
- *     void * next;
- *     char parentNodeName[XR_MAX_CONTROLLER_MODEL_NODE_NAME_SIZE_MSFT];
- *     char nodeName[XR_MAX_CONTROLLER_MODEL_NODE_NAME_SIZE_MSFT];
- * }
- */ -public class XrControllerModelNodePropertiesMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - PARENTNODENAME, - NODENAME; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __array(1, XR_MAX_CONTROLLER_MODEL_NODE_NAME_SIZE_MSFT), - __array(1, XR_MAX_CONTROLLER_MODEL_NODE_NAME_SIZE_MSFT) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - PARENTNODENAME = layout.offsetof(2); - NODENAME = layout.offsetof(3); - } - - /** - * Creates a {@code XrControllerModelNodePropertiesMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrControllerModelNodePropertiesMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return a {@link ByteBuffer} view of the {@code parentNodeName} field. */ - @NativeType("char[XR_MAX_CONTROLLER_MODEL_NODE_NAME_SIZE_MSFT]") - public ByteBuffer parentNodeName() { return nparentNodeName(address()); } - /** @return the null-terminated string stored in the {@code parentNodeName} field. */ - @NativeType("char[XR_MAX_CONTROLLER_MODEL_NODE_NAME_SIZE_MSFT]") - public String parentNodeNameString() { return nparentNodeNameString(address()); } - /** @return a {@link ByteBuffer} view of the {@code nodeName} field. */ - @NativeType("char[XR_MAX_CONTROLLER_MODEL_NODE_NAME_SIZE_MSFT]") - public ByteBuffer nodeName() { return nnodeName(address()); } - /** @return the null-terminated string stored in the {@code nodeName} field. */ - @NativeType("char[XR_MAX_CONTROLLER_MODEL_NODE_NAME_SIZE_MSFT]") - public String nodeNameString() { return nnodeNameString(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrControllerModelNodePropertiesMSFT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link MSFTControllerModel#XR_TYPE_CONTROLLER_MODEL_NODE_PROPERTIES_MSFT TYPE_CONTROLLER_MODEL_NODE_PROPERTIES_MSFT} value to the {@code type} field. */ - public XrControllerModelNodePropertiesMSFT type$Default() { return type(MSFTControllerModel.XR_TYPE_CONTROLLER_MODEL_NODE_PROPERTIES_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public XrControllerModelNodePropertiesMSFT next(@NativeType("void *") long value) { nnext(address(), value); return this; } - /** Copies the specified encoded string to the {@code parentNodeName} field. */ - public XrControllerModelNodePropertiesMSFT parentNodeName(@NativeType("char[XR_MAX_CONTROLLER_MODEL_NODE_NAME_SIZE_MSFT]") ByteBuffer value) { nparentNodeName(address(), value); return this; } - /** Copies the specified encoded string to the {@code nodeName} field. */ - public XrControllerModelNodePropertiesMSFT nodeName(@NativeType("char[XR_MAX_CONTROLLER_MODEL_NODE_NAME_SIZE_MSFT]") ByteBuffer value) { nnodeName(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrControllerModelNodePropertiesMSFT set( - int type, - long next, - ByteBuffer parentNodeName, - ByteBuffer nodeName - ) { - type(type); - next(next); - parentNodeName(parentNodeName); - nodeName(nodeName); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrControllerModelNodePropertiesMSFT set(XrControllerModelNodePropertiesMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrControllerModelNodePropertiesMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrControllerModelNodePropertiesMSFT malloc() { - return wrap(XrControllerModelNodePropertiesMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrControllerModelNodePropertiesMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrControllerModelNodePropertiesMSFT calloc() { - return wrap(XrControllerModelNodePropertiesMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrControllerModelNodePropertiesMSFT} instance allocated with {@link BufferUtils}. */ - public static XrControllerModelNodePropertiesMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrControllerModelNodePropertiesMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrControllerModelNodePropertiesMSFT} instance for the specified memory address. */ - public static XrControllerModelNodePropertiesMSFT create(long address) { - return wrap(XrControllerModelNodePropertiesMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrControllerModelNodePropertiesMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrControllerModelNodePropertiesMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrControllerModelNodePropertiesMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrControllerModelNodePropertiesMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrControllerModelNodePropertiesMSFT malloc(MemoryStack stack) { - return wrap(XrControllerModelNodePropertiesMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrControllerModelNodePropertiesMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrControllerModelNodePropertiesMSFT calloc(MemoryStack stack) { - return wrap(XrControllerModelNodePropertiesMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrControllerModelNodePropertiesMSFT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrControllerModelNodePropertiesMSFT.NEXT); } - /** Unsafe version of {@link #parentNodeName}. */ - public static ByteBuffer nparentNodeName(long struct) { return memByteBuffer(struct + XrControllerModelNodePropertiesMSFT.PARENTNODENAME, XR_MAX_CONTROLLER_MODEL_NODE_NAME_SIZE_MSFT); } - /** Unsafe version of {@link #parentNodeNameString}. */ - public static String nparentNodeNameString(long struct) { return memUTF8(struct + XrControllerModelNodePropertiesMSFT.PARENTNODENAME); } - /** Unsafe version of {@link #nodeName}. */ - public static ByteBuffer nnodeName(long struct) { return memByteBuffer(struct + XrControllerModelNodePropertiesMSFT.NODENAME, XR_MAX_CONTROLLER_MODEL_NODE_NAME_SIZE_MSFT); } - /** Unsafe version of {@link #nodeNameString}. */ - public static String nnodeNameString(long struct) { return memUTF8(struct + XrControllerModelNodePropertiesMSFT.NODENAME); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrControllerModelNodePropertiesMSFT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrControllerModelNodePropertiesMSFT.NEXT, value); } - /** Unsafe version of {@link #parentNodeName(ByteBuffer) parentNodeName}. */ - public static void nparentNodeName(long struct, ByteBuffer value) { - if (CHECKS) { - checkNT1(value); - checkGT(value, XR_MAX_CONTROLLER_MODEL_NODE_NAME_SIZE_MSFT); - } - memCopy(memAddress(value), struct + XrControllerModelNodePropertiesMSFT.PARENTNODENAME, value.remaining()); - } - /** Unsafe version of {@link #nodeName(ByteBuffer) nodeName}. */ - public static void nnodeName(long struct, ByteBuffer value) { - if (CHECKS) { - checkNT1(value); - checkGT(value, XR_MAX_CONTROLLER_MODEL_NODE_NAME_SIZE_MSFT); - } - memCopy(memAddress(value), struct + XrControllerModelNodePropertiesMSFT.NODENAME, value.remaining()); - } - - // ----------------------------------- - - /** An array of {@link XrControllerModelNodePropertiesMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrControllerModelNodePropertiesMSFT ELEMENT_FACTORY = XrControllerModelNodePropertiesMSFT.create(-1L); - - /** - * Creates a new {@code XrControllerModelNodePropertiesMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrControllerModelNodePropertiesMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrControllerModelNodePropertiesMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrControllerModelNodePropertiesMSFT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrControllerModelNodePropertiesMSFT.nnext(address()); } - /** @return a {@link ByteBuffer} view of the {@code parentNodeName} field. */ - @NativeType("char[XR_MAX_CONTROLLER_MODEL_NODE_NAME_SIZE_MSFT]") - public ByteBuffer parentNodeName() { return XrControllerModelNodePropertiesMSFT.nparentNodeName(address()); } - /** @return the null-terminated string stored in the {@code parentNodeName} field. */ - @NativeType("char[XR_MAX_CONTROLLER_MODEL_NODE_NAME_SIZE_MSFT]") - public String parentNodeNameString() { return XrControllerModelNodePropertiesMSFT.nparentNodeNameString(address()); } - /** @return a {@link ByteBuffer} view of the {@code nodeName} field. */ - @NativeType("char[XR_MAX_CONTROLLER_MODEL_NODE_NAME_SIZE_MSFT]") - public ByteBuffer nodeName() { return XrControllerModelNodePropertiesMSFT.nnodeName(address()); } - /** @return the null-terminated string stored in the {@code nodeName} field. */ - @NativeType("char[XR_MAX_CONTROLLER_MODEL_NODE_NAME_SIZE_MSFT]") - public String nodeNameString() { return XrControllerModelNodePropertiesMSFT.nnodeNameString(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrControllerModelNodePropertiesMSFT.ntype(address(), value); return this; } - /** Sets the {@link MSFTControllerModel#XR_TYPE_CONTROLLER_MODEL_NODE_PROPERTIES_MSFT TYPE_CONTROLLER_MODEL_NODE_PROPERTIES_MSFT} value to the {@code type} field. */ - public Buffer type$Default() { return type(MSFTControllerModel.XR_TYPE_CONTROLLER_MODEL_NODE_PROPERTIES_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrControllerModelNodePropertiesMSFT.nnext(address(), value); return this; } - /** Copies the specified encoded string to the {@code parentNodeName} field. */ - public Buffer parentNodeName(@NativeType("char[XR_MAX_CONTROLLER_MODEL_NODE_NAME_SIZE_MSFT]") ByteBuffer value) { XrControllerModelNodePropertiesMSFT.nparentNodeName(address(), value); return this; } - /** Copies the specified encoded string to the {@code nodeName} field. */ - public Buffer nodeName(@NativeType("char[XR_MAX_CONTROLLER_MODEL_NODE_NAME_SIZE_MSFT]") ByteBuffer value) { XrControllerModelNodePropertiesMSFT.nnodeName(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrControllerModelNodeStateMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrControllerModelNodeStateMSFT.java deleted file mode 100644 index c7fb46e2..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrControllerModelNodeStateMSFT.java +++ /dev/null @@ -1,301 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrControllerModelNodeStateMSFT {
- *     XrStructureType type;
- *     void * next;
- *     {@link XrPosef XrPosef} nodePose;
- * }
- */ -public class XrControllerModelNodeStateMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - NODEPOSE; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(XrPosef.SIZEOF, XrPosef.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - NODEPOSE = layout.offsetof(2); - } - - /** - * Creates a {@code XrControllerModelNodeStateMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrControllerModelNodeStateMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return a {@link XrPosef} view of the {@code nodePose} field. */ - public XrPosef nodePose() { return nnodePose(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrControllerModelNodeStateMSFT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link MSFTControllerModel#XR_TYPE_CONTROLLER_MODEL_NODE_STATE_MSFT TYPE_CONTROLLER_MODEL_NODE_STATE_MSFT} value to the {@code type} field. */ - public XrControllerModelNodeStateMSFT type$Default() { return type(MSFTControllerModel.XR_TYPE_CONTROLLER_MODEL_NODE_STATE_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public XrControllerModelNodeStateMSFT next(@NativeType("void *") long value) { nnext(address(), value); return this; } - /** Copies the specified {@link XrPosef} to the {@code nodePose} field. */ - public XrControllerModelNodeStateMSFT nodePose(XrPosef value) { nnodePose(address(), value); return this; } - /** Passes the {@code nodePose} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrControllerModelNodeStateMSFT nodePose(java.util.function.Consumer consumer) { consumer.accept(nodePose()); return this; } - - /** Initializes this struct with the specified values. */ - public XrControllerModelNodeStateMSFT set( - int type, - long next, - XrPosef nodePose - ) { - type(type); - next(next); - nodePose(nodePose); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrControllerModelNodeStateMSFT set(XrControllerModelNodeStateMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrControllerModelNodeStateMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrControllerModelNodeStateMSFT malloc() { - return wrap(XrControllerModelNodeStateMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrControllerModelNodeStateMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrControllerModelNodeStateMSFT calloc() { - return wrap(XrControllerModelNodeStateMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrControllerModelNodeStateMSFT} instance allocated with {@link BufferUtils}. */ - public static XrControllerModelNodeStateMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrControllerModelNodeStateMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrControllerModelNodeStateMSFT} instance for the specified memory address. */ - public static XrControllerModelNodeStateMSFT create(long address) { - return wrap(XrControllerModelNodeStateMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrControllerModelNodeStateMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrControllerModelNodeStateMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrControllerModelNodeStateMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrControllerModelNodeStateMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrControllerModelNodeStateMSFT malloc(MemoryStack stack) { - return wrap(XrControllerModelNodeStateMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrControllerModelNodeStateMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrControllerModelNodeStateMSFT calloc(MemoryStack stack) { - return wrap(XrControllerModelNodeStateMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrControllerModelNodeStateMSFT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrControllerModelNodeStateMSFT.NEXT); } - /** Unsafe version of {@link #nodePose}. */ - public static XrPosef nnodePose(long struct) { return XrPosef.create(struct + XrControllerModelNodeStateMSFT.NODEPOSE); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrControllerModelNodeStateMSFT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrControllerModelNodeStateMSFT.NEXT, value); } - /** Unsafe version of {@link #nodePose(XrPosef) nodePose}. */ - public static void nnodePose(long struct, XrPosef value) { memCopy(value.address(), struct + XrControllerModelNodeStateMSFT.NODEPOSE, XrPosef.SIZEOF); } - - // ----------------------------------- - - /** An array of {@link XrControllerModelNodeStateMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrControllerModelNodeStateMSFT ELEMENT_FACTORY = XrControllerModelNodeStateMSFT.create(-1L); - - /** - * Creates a new {@code XrControllerModelNodeStateMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrControllerModelNodeStateMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrControllerModelNodeStateMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrControllerModelNodeStateMSFT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrControllerModelNodeStateMSFT.nnext(address()); } - /** @return a {@link XrPosef} view of the {@code nodePose} field. */ - public XrPosef nodePose() { return XrControllerModelNodeStateMSFT.nnodePose(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrControllerModelNodeStateMSFT.ntype(address(), value); return this; } - /** Sets the {@link MSFTControllerModel#XR_TYPE_CONTROLLER_MODEL_NODE_STATE_MSFT TYPE_CONTROLLER_MODEL_NODE_STATE_MSFT} value to the {@code type} field. */ - public Buffer type$Default() { return type(MSFTControllerModel.XR_TYPE_CONTROLLER_MODEL_NODE_STATE_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrControllerModelNodeStateMSFT.nnext(address(), value); return this; } - /** Copies the specified {@link XrPosef} to the {@code nodePose} field. */ - public Buffer nodePose(XrPosef value) { XrControllerModelNodeStateMSFT.nnodePose(address(), value); return this; } - /** Passes the {@code nodePose} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer nodePose(java.util.function.Consumer consumer) { consumer.accept(nodePose()); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrControllerModelPropertiesMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrControllerModelPropertiesMSFT.java deleted file mode 100644 index 79876133..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrControllerModelPropertiesMSFT.java +++ /dev/null @@ -1,341 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrControllerModelPropertiesMSFT {
- *     XrStructureType type;
- *     void * next;
- *     uint32_t nodeCapacityInput;
- *     uint32_t nodeCountOutput;
- *     {@link XrControllerModelNodePropertiesMSFT XrControllerModelNodePropertiesMSFT} * nodeProperties;
- * }
- */ -public class XrControllerModelPropertiesMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - NODECAPACITYINPUT, - NODECOUNTOUTPUT, - NODEPROPERTIES; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - NODECAPACITYINPUT = layout.offsetof(2); - NODECOUNTOUTPUT = layout.offsetof(3); - NODEPROPERTIES = layout.offsetof(4); - } - - /** - * Creates a {@code XrControllerModelPropertiesMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrControllerModelPropertiesMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return the value of the {@code nodeCapacityInput} field. */ - @NativeType("uint32_t") - public int nodeCapacityInput() { return nnodeCapacityInput(address()); } - /** @return the value of the {@code nodeCountOutput} field. */ - @NativeType("uint32_t") - public int nodeCountOutput() { return nnodeCountOutput(address()); } - /** @return a {@link XrControllerModelNodePropertiesMSFT.Buffer} view of the struct array pointed to by the {@code nodeProperties} field. */ - @Nullable - @NativeType("XrControllerModelNodePropertiesMSFT *") - public XrControllerModelNodePropertiesMSFT.Buffer nodeProperties() { return nnodeProperties(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrControllerModelPropertiesMSFT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link MSFTControllerModel#XR_TYPE_CONTROLLER_MODEL_PROPERTIES_MSFT TYPE_CONTROLLER_MODEL_PROPERTIES_MSFT} value to the {@code type} field. */ - public XrControllerModelPropertiesMSFT type$Default() { return type(MSFTControllerModel.XR_TYPE_CONTROLLER_MODEL_PROPERTIES_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public XrControllerModelPropertiesMSFT next(@NativeType("void *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code nodeCapacityInput} field. */ - public XrControllerModelPropertiesMSFT nodeCapacityInput(@NativeType("uint32_t") int value) { nnodeCapacityInput(address(), value); return this; } - /** Sets the specified value to the {@code nodeCountOutput} field. */ - public XrControllerModelPropertiesMSFT nodeCountOutput(@NativeType("uint32_t") int value) { nnodeCountOutput(address(), value); return this; } - /** Sets the address of the specified {@link XrControllerModelNodePropertiesMSFT.Buffer} to the {@code nodeProperties} field. */ - public XrControllerModelPropertiesMSFT nodeProperties(@Nullable @NativeType("XrControllerModelNodePropertiesMSFT *") XrControllerModelNodePropertiesMSFT.Buffer value) { nnodeProperties(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrControllerModelPropertiesMSFT set( - int type, - long next, - int nodeCapacityInput, - int nodeCountOutput, - @Nullable XrControllerModelNodePropertiesMSFT.Buffer nodeProperties - ) { - type(type); - next(next); - nodeCapacityInput(nodeCapacityInput); - nodeCountOutput(nodeCountOutput); - nodeProperties(nodeProperties); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrControllerModelPropertiesMSFT set(XrControllerModelPropertiesMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrControllerModelPropertiesMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrControllerModelPropertiesMSFT malloc() { - return wrap(XrControllerModelPropertiesMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrControllerModelPropertiesMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrControllerModelPropertiesMSFT calloc() { - return wrap(XrControllerModelPropertiesMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrControllerModelPropertiesMSFT} instance allocated with {@link BufferUtils}. */ - public static XrControllerModelPropertiesMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrControllerModelPropertiesMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrControllerModelPropertiesMSFT} instance for the specified memory address. */ - public static XrControllerModelPropertiesMSFT create(long address) { - return wrap(XrControllerModelPropertiesMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrControllerModelPropertiesMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrControllerModelPropertiesMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrControllerModelPropertiesMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrControllerModelPropertiesMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrControllerModelPropertiesMSFT malloc(MemoryStack stack) { - return wrap(XrControllerModelPropertiesMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrControllerModelPropertiesMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrControllerModelPropertiesMSFT calloc(MemoryStack stack) { - return wrap(XrControllerModelPropertiesMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrControllerModelPropertiesMSFT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrControllerModelPropertiesMSFT.NEXT); } - /** Unsafe version of {@link #nodeCapacityInput}. */ - public static int nnodeCapacityInput(long struct) { return UNSAFE.getInt(null, struct + XrControllerModelPropertiesMSFT.NODECAPACITYINPUT); } - /** Unsafe version of {@link #nodeCountOutput}. */ - public static int nnodeCountOutput(long struct) { return UNSAFE.getInt(null, struct + XrControllerModelPropertiesMSFT.NODECOUNTOUTPUT); } - /** Unsafe version of {@link #nodeProperties}. */ - @Nullable public static XrControllerModelNodePropertiesMSFT.Buffer nnodeProperties(long struct) { return XrControllerModelNodePropertiesMSFT.createSafe(memGetAddress(struct + XrControllerModelPropertiesMSFT.NODEPROPERTIES), nnodeCapacityInput(struct)); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrControllerModelPropertiesMSFT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrControllerModelPropertiesMSFT.NEXT, value); } - /** Sets the specified value to the {@code nodeCapacityInput} field of the specified {@code struct}. */ - public static void nnodeCapacityInput(long struct, int value) { UNSAFE.putInt(null, struct + XrControllerModelPropertiesMSFT.NODECAPACITYINPUT, value); } - /** Unsafe version of {@link #nodeCountOutput(int) nodeCountOutput}. */ - public static void nnodeCountOutput(long struct, int value) { UNSAFE.putInt(null, struct + XrControllerModelPropertiesMSFT.NODECOUNTOUTPUT, value); } - /** Unsafe version of {@link #nodeProperties(XrControllerModelNodePropertiesMSFT.Buffer) nodeProperties}. */ - public static void nnodeProperties(long struct, @Nullable XrControllerModelNodePropertiesMSFT.Buffer value) { memPutAddress(struct + XrControllerModelPropertiesMSFT.NODEPROPERTIES, memAddressSafe(value)); if (value != null) { nnodeCapacityInput(struct, value.remaining()); } } - - // ----------------------------------- - - /** An array of {@link XrControllerModelPropertiesMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrControllerModelPropertiesMSFT ELEMENT_FACTORY = XrControllerModelPropertiesMSFT.create(-1L); - - /** - * Creates a new {@code XrControllerModelPropertiesMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrControllerModelPropertiesMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrControllerModelPropertiesMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrControllerModelPropertiesMSFT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrControllerModelPropertiesMSFT.nnext(address()); } - /** @return the value of the {@code nodeCapacityInput} field. */ - @NativeType("uint32_t") - public int nodeCapacityInput() { return XrControllerModelPropertiesMSFT.nnodeCapacityInput(address()); } - /** @return the value of the {@code nodeCountOutput} field. */ - @NativeType("uint32_t") - public int nodeCountOutput() { return XrControllerModelPropertiesMSFT.nnodeCountOutput(address()); } - /** @return a {@link XrControllerModelNodePropertiesMSFT.Buffer} view of the struct array pointed to by the {@code nodeProperties} field. */ - @Nullable - @NativeType("XrControllerModelNodePropertiesMSFT *") - public XrControllerModelNodePropertiesMSFT.Buffer nodeProperties() { return XrControllerModelPropertiesMSFT.nnodeProperties(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrControllerModelPropertiesMSFT.ntype(address(), value); return this; } - /** Sets the {@link MSFTControllerModel#XR_TYPE_CONTROLLER_MODEL_PROPERTIES_MSFT TYPE_CONTROLLER_MODEL_PROPERTIES_MSFT} value to the {@code type} field. */ - public Buffer type$Default() { return type(MSFTControllerModel.XR_TYPE_CONTROLLER_MODEL_PROPERTIES_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrControllerModelPropertiesMSFT.nnext(address(), value); return this; } - /** Sets the specified value to the {@code nodeCapacityInput} field. */ - public Buffer nodeCapacityInput(@NativeType("uint32_t") int value) { XrControllerModelPropertiesMSFT.nnodeCapacityInput(address(), value); return this; } - /** Sets the specified value to the {@code nodeCountOutput} field. */ - public Buffer nodeCountOutput(@NativeType("uint32_t") int value) { XrControllerModelPropertiesMSFT.nnodeCountOutput(address(), value); return this; } - /** Sets the address of the specified {@link XrControllerModelNodePropertiesMSFT.Buffer} to the {@code nodeProperties} field. */ - public Buffer nodeProperties(@Nullable @NativeType("XrControllerModelNodePropertiesMSFT *") XrControllerModelNodePropertiesMSFT.Buffer value) { XrControllerModelPropertiesMSFT.nnodeProperties(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrControllerModelStateMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrControllerModelStateMSFT.java deleted file mode 100644 index faafae09..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrControllerModelStateMSFT.java +++ /dev/null @@ -1,341 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrControllerModelStateMSFT {
- *     XrStructureType type;
- *     void * next;
- *     uint32_t nodeCapacityInput;
- *     uint32_t nodeCountOutput;
- *     {@link XrControllerModelNodeStateMSFT XrControllerModelNodeStateMSFT} * nodeStates;
- * }
- */ -public class XrControllerModelStateMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - NODECAPACITYINPUT, - NODECOUNTOUTPUT, - NODESTATES; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - NODECAPACITYINPUT = layout.offsetof(2); - NODECOUNTOUTPUT = layout.offsetof(3); - NODESTATES = layout.offsetof(4); - } - - /** - * Creates a {@code XrControllerModelStateMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrControllerModelStateMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return the value of the {@code nodeCapacityInput} field. */ - @NativeType("uint32_t") - public int nodeCapacityInput() { return nnodeCapacityInput(address()); } - /** @return the value of the {@code nodeCountOutput} field. */ - @NativeType("uint32_t") - public int nodeCountOutput() { return nnodeCountOutput(address()); } - /** @return a {@link XrControllerModelNodeStateMSFT.Buffer} view of the struct array pointed to by the {@code nodeStates} field. */ - @Nullable - @NativeType("XrControllerModelNodeStateMSFT *") - public XrControllerModelNodeStateMSFT.Buffer nodeStates() { return nnodeStates(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrControllerModelStateMSFT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link MSFTControllerModel#XR_TYPE_CONTROLLER_MODEL_STATE_MSFT TYPE_CONTROLLER_MODEL_STATE_MSFT} value to the {@code type} field. */ - public XrControllerModelStateMSFT type$Default() { return type(MSFTControllerModel.XR_TYPE_CONTROLLER_MODEL_STATE_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public XrControllerModelStateMSFT next(@NativeType("void *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code nodeCapacityInput} field. */ - public XrControllerModelStateMSFT nodeCapacityInput(@NativeType("uint32_t") int value) { nnodeCapacityInput(address(), value); return this; } - /** Sets the specified value to the {@code nodeCountOutput} field. */ - public XrControllerModelStateMSFT nodeCountOutput(@NativeType("uint32_t") int value) { nnodeCountOutput(address(), value); return this; } - /** Sets the address of the specified {@link XrControllerModelNodeStateMSFT.Buffer} to the {@code nodeStates} field. */ - public XrControllerModelStateMSFT nodeStates(@Nullable @NativeType("XrControllerModelNodeStateMSFT *") XrControllerModelNodeStateMSFT.Buffer value) { nnodeStates(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrControllerModelStateMSFT set( - int type, - long next, - int nodeCapacityInput, - int nodeCountOutput, - @Nullable XrControllerModelNodeStateMSFT.Buffer nodeStates - ) { - type(type); - next(next); - nodeCapacityInput(nodeCapacityInput); - nodeCountOutput(nodeCountOutput); - nodeStates(nodeStates); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrControllerModelStateMSFT set(XrControllerModelStateMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrControllerModelStateMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrControllerModelStateMSFT malloc() { - return wrap(XrControllerModelStateMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrControllerModelStateMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrControllerModelStateMSFT calloc() { - return wrap(XrControllerModelStateMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrControllerModelStateMSFT} instance allocated with {@link BufferUtils}. */ - public static XrControllerModelStateMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrControllerModelStateMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrControllerModelStateMSFT} instance for the specified memory address. */ - public static XrControllerModelStateMSFT create(long address) { - return wrap(XrControllerModelStateMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrControllerModelStateMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrControllerModelStateMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrControllerModelStateMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrControllerModelStateMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrControllerModelStateMSFT malloc(MemoryStack stack) { - return wrap(XrControllerModelStateMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrControllerModelStateMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrControllerModelStateMSFT calloc(MemoryStack stack) { - return wrap(XrControllerModelStateMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrControllerModelStateMSFT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrControllerModelStateMSFT.NEXT); } - /** Unsafe version of {@link #nodeCapacityInput}. */ - public static int nnodeCapacityInput(long struct) { return UNSAFE.getInt(null, struct + XrControllerModelStateMSFT.NODECAPACITYINPUT); } - /** Unsafe version of {@link #nodeCountOutput}. */ - public static int nnodeCountOutput(long struct) { return UNSAFE.getInt(null, struct + XrControllerModelStateMSFT.NODECOUNTOUTPUT); } - /** Unsafe version of {@link #nodeStates}. */ - @Nullable public static XrControllerModelNodeStateMSFT.Buffer nnodeStates(long struct) { return XrControllerModelNodeStateMSFT.createSafe(memGetAddress(struct + XrControllerModelStateMSFT.NODESTATES), nnodeCapacityInput(struct)); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrControllerModelStateMSFT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrControllerModelStateMSFT.NEXT, value); } - /** Sets the specified value to the {@code nodeCapacityInput} field of the specified {@code struct}. */ - public static void nnodeCapacityInput(long struct, int value) { UNSAFE.putInt(null, struct + XrControllerModelStateMSFT.NODECAPACITYINPUT, value); } - /** Unsafe version of {@link #nodeCountOutput(int) nodeCountOutput}. */ - public static void nnodeCountOutput(long struct, int value) { UNSAFE.putInt(null, struct + XrControllerModelStateMSFT.NODECOUNTOUTPUT, value); } - /** Unsafe version of {@link #nodeStates(XrControllerModelNodeStateMSFT.Buffer) nodeStates}. */ - public static void nnodeStates(long struct, @Nullable XrControllerModelNodeStateMSFT.Buffer value) { memPutAddress(struct + XrControllerModelStateMSFT.NODESTATES, memAddressSafe(value)); if (value != null) { nnodeCapacityInput(struct, value.remaining()); } } - - // ----------------------------------- - - /** An array of {@link XrControllerModelStateMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrControllerModelStateMSFT ELEMENT_FACTORY = XrControllerModelStateMSFT.create(-1L); - - /** - * Creates a new {@code XrControllerModelStateMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrControllerModelStateMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrControllerModelStateMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrControllerModelStateMSFT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrControllerModelStateMSFT.nnext(address()); } - /** @return the value of the {@code nodeCapacityInput} field. */ - @NativeType("uint32_t") - public int nodeCapacityInput() { return XrControllerModelStateMSFT.nnodeCapacityInput(address()); } - /** @return the value of the {@code nodeCountOutput} field. */ - @NativeType("uint32_t") - public int nodeCountOutput() { return XrControllerModelStateMSFT.nnodeCountOutput(address()); } - /** @return a {@link XrControllerModelNodeStateMSFT.Buffer} view of the struct array pointed to by the {@code nodeStates} field. */ - @Nullable - @NativeType("XrControllerModelNodeStateMSFT *") - public XrControllerModelNodeStateMSFT.Buffer nodeStates() { return XrControllerModelStateMSFT.nnodeStates(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrControllerModelStateMSFT.ntype(address(), value); return this; } - /** Sets the {@link MSFTControllerModel#XR_TYPE_CONTROLLER_MODEL_STATE_MSFT TYPE_CONTROLLER_MODEL_STATE_MSFT} value to the {@code type} field. */ - public Buffer type$Default() { return type(MSFTControllerModel.XR_TYPE_CONTROLLER_MODEL_STATE_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrControllerModelStateMSFT.nnext(address(), value); return this; } - /** Sets the specified value to the {@code nodeCapacityInput} field. */ - public Buffer nodeCapacityInput(@NativeType("uint32_t") int value) { XrControllerModelStateMSFT.nnodeCapacityInput(address(), value); return this; } - /** Sets the specified value to the {@code nodeCountOutput} field. */ - public Buffer nodeCountOutput(@NativeType("uint32_t") int value) { XrControllerModelStateMSFT.nnodeCountOutput(address(), value); return this; } - /** Sets the address of the specified {@link XrControllerModelNodeStateMSFT.Buffer} to the {@code nodeStates} field. */ - public Buffer nodeStates(@Nullable @NativeType("XrControllerModelNodeStateMSFT *") XrControllerModelNodeStateMSFT.Buffer value) { XrControllerModelStateMSFT.nnodeStates(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrDebugUtilsLabelEXT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrDebugUtilsLabelEXT.java deleted file mode 100644 index 54f11e3d..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrDebugUtilsLabelEXT.java +++ /dev/null @@ -1,332 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrDebugUtilsLabelEXT {
- *     XrStructureType type;
- *     void const * next;
- *     char const * labelName;
- * }
- */ -public class XrDebugUtilsLabelEXT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - LABELNAME; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - LABELNAME = layout.offsetof(2); - } - - /** - * Creates a {@code XrDebugUtilsLabelEXT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrDebugUtilsLabelEXT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return a {@link ByteBuffer} view of the null-terminated string pointed to by the {@code labelName} field. */ - @NativeType("char const *") - public ByteBuffer labelName() { return nlabelName(address()); } - /** @return the null-terminated string pointed to by the {@code labelName} field. */ - @NativeType("char const *") - public String labelNameString() { return nlabelNameString(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrDebugUtilsLabelEXT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link EXTDebugUtils#XR_TYPE_DEBUG_UTILS_LABEL_EXT TYPE_DEBUG_UTILS_LABEL_EXT} value to the {@code type} field. */ - public XrDebugUtilsLabelEXT type$Default() { return type(EXTDebugUtils.XR_TYPE_DEBUG_UTILS_LABEL_EXT); } - /** Sets the specified value to the {@code next} field. */ - public XrDebugUtilsLabelEXT next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the address of the specified encoded string to the {@code labelName} field. */ - public XrDebugUtilsLabelEXT labelName(@NativeType("char const *") ByteBuffer value) { nlabelName(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrDebugUtilsLabelEXT set( - int type, - long next, - ByteBuffer labelName - ) { - type(type); - next(next); - labelName(labelName); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrDebugUtilsLabelEXT set(XrDebugUtilsLabelEXT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrDebugUtilsLabelEXT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrDebugUtilsLabelEXT malloc() { - return wrap(XrDebugUtilsLabelEXT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrDebugUtilsLabelEXT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrDebugUtilsLabelEXT calloc() { - return wrap(XrDebugUtilsLabelEXT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrDebugUtilsLabelEXT} instance allocated with {@link BufferUtils}. */ - public static XrDebugUtilsLabelEXT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrDebugUtilsLabelEXT.class, memAddress(container), container); - } - - /** Returns a new {@code XrDebugUtilsLabelEXT} instance for the specified memory address. */ - public static XrDebugUtilsLabelEXT create(long address) { - return wrap(XrDebugUtilsLabelEXT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrDebugUtilsLabelEXT createSafe(long address) { - return address == NULL ? null : wrap(XrDebugUtilsLabelEXT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrDebugUtilsLabelEXT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrDebugUtilsLabelEXT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrDebugUtilsLabelEXT malloc(MemoryStack stack) { - return wrap(XrDebugUtilsLabelEXT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrDebugUtilsLabelEXT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrDebugUtilsLabelEXT calloc(MemoryStack stack) { - return wrap(XrDebugUtilsLabelEXT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrDebugUtilsLabelEXT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrDebugUtilsLabelEXT.NEXT); } - /** Unsafe version of {@link #labelName}. */ - public static ByteBuffer nlabelName(long struct) { return memByteBufferNT1(memGetAddress(struct + XrDebugUtilsLabelEXT.LABELNAME)); } - /** Unsafe version of {@link #labelNameString}. */ - public static String nlabelNameString(long struct) { return memUTF8(memGetAddress(struct + XrDebugUtilsLabelEXT.LABELNAME)); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrDebugUtilsLabelEXT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrDebugUtilsLabelEXT.NEXT, value); } - /** Unsafe version of {@link #labelName(ByteBuffer) labelName}. */ - public static void nlabelName(long struct, ByteBuffer value) { - if (CHECKS) { checkNT1(value); } - memPutAddress(struct + XrDebugUtilsLabelEXT.LABELNAME, memAddress(value)); - } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XrDebugUtilsLabelEXT.LABELNAME)); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrDebugUtilsLabelEXT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrDebugUtilsLabelEXT ELEMENT_FACTORY = XrDebugUtilsLabelEXT.create(-1L); - - /** - * Creates a new {@code XrDebugUtilsLabelEXT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrDebugUtilsLabelEXT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrDebugUtilsLabelEXT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrDebugUtilsLabelEXT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrDebugUtilsLabelEXT.nnext(address()); } - /** @return a {@link ByteBuffer} view of the null-terminated string pointed to by the {@code labelName} field. */ - @NativeType("char const *") - public ByteBuffer labelName() { return XrDebugUtilsLabelEXT.nlabelName(address()); } - /** @return the null-terminated string pointed to by the {@code labelName} field. */ - @NativeType("char const *") - public String labelNameString() { return XrDebugUtilsLabelEXT.nlabelNameString(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrDebugUtilsLabelEXT.ntype(address(), value); return this; } - /** Sets the {@link EXTDebugUtils#XR_TYPE_DEBUG_UTILS_LABEL_EXT TYPE_DEBUG_UTILS_LABEL_EXT} value to the {@code type} field. */ - public Buffer type$Default() { return type(EXTDebugUtils.XR_TYPE_DEBUG_UTILS_LABEL_EXT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrDebugUtilsLabelEXT.nnext(address(), value); return this; } - /** Sets the address of the specified encoded string to the {@code labelName} field. */ - public Buffer labelName(@NativeType("char const *") ByteBuffer value) { XrDebugUtilsLabelEXT.nlabelName(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrDebugUtilsMessengerCallbackDataEXT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrDebugUtilsMessengerCallbackDataEXT.java deleted file mode 100644 index 872709d8..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrDebugUtilsMessengerCallbackDataEXT.java +++ /dev/null @@ -1,480 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrDebugUtilsMessengerCallbackDataEXT {
- *     XrStructureType type;
- *     void const * next;
- *     char const * messageId;
- *     char const * functionName;
- *     char const * message;
- *     uint32_t objectCount;
- *     {@link XrDebugUtilsObjectNameInfoEXT XrDebugUtilsObjectNameInfoEXT} * objects;
- *     uint32_t sessionLabelCount;
- *     {@link XrDebugUtilsLabelEXT XrDebugUtilsLabelEXT} * sessionLabels;
- * }
- */ -public class XrDebugUtilsMessengerCallbackDataEXT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - MESSAGEID, - FUNCTIONNAME, - MESSAGE, - OBJECTCOUNT, - OBJECTS, - SESSIONLABELCOUNT, - SESSIONLABELS; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - MESSAGEID = layout.offsetof(2); - FUNCTIONNAME = layout.offsetof(3); - MESSAGE = layout.offsetof(4); - OBJECTCOUNT = layout.offsetof(5); - OBJECTS = layout.offsetof(6); - SESSIONLABELCOUNT = layout.offsetof(7); - SESSIONLABELS = layout.offsetof(8); - } - - /** - * Creates a {@code XrDebugUtilsMessengerCallbackDataEXT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrDebugUtilsMessengerCallbackDataEXT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return a {@link ByteBuffer} view of the null-terminated string pointed to by the {@code messageId} field. */ - @NativeType("char const *") - public ByteBuffer messageId() { return nmessageId(address()); } - /** @return the null-terminated string pointed to by the {@code messageId} field. */ - @NativeType("char const *") - public String messageIdString() { return nmessageIdString(address()); } - /** @return a {@link ByteBuffer} view of the null-terminated string pointed to by the {@code functionName} field. */ - @NativeType("char const *") - public ByteBuffer functionName() { return nfunctionName(address()); } - /** @return the null-terminated string pointed to by the {@code functionName} field. */ - @NativeType("char const *") - public String functionNameString() { return nfunctionNameString(address()); } - /** @return a {@link ByteBuffer} view of the null-terminated string pointed to by the {@code message} field. */ - @NativeType("char const *") - public ByteBuffer message() { return nmessage(address()); } - /** @return the null-terminated string pointed to by the {@code message} field. */ - @NativeType("char const *") - public String messageString() { return nmessageString(address()); } - /** @return the value of the {@code objectCount} field. */ - @NativeType("uint32_t") - public int objectCount() { return nobjectCount(address()); } - /** @return a {@link XrDebugUtilsObjectNameInfoEXT.Buffer} view of the struct array pointed to by the {@code objects} field. */ - @Nullable - @NativeType("XrDebugUtilsObjectNameInfoEXT *") - public XrDebugUtilsObjectNameInfoEXT.Buffer objects() { return nobjects(address()); } - /** @return the value of the {@code sessionLabelCount} field. */ - @NativeType("uint32_t") - public int sessionLabelCount() { return nsessionLabelCount(address()); } - /** @return a {@link XrDebugUtilsLabelEXT.Buffer} view of the struct array pointed to by the {@code sessionLabels} field. */ - @Nullable - @NativeType("XrDebugUtilsLabelEXT *") - public XrDebugUtilsLabelEXT.Buffer sessionLabels() { return nsessionLabels(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrDebugUtilsMessengerCallbackDataEXT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link EXTDebugUtils#XR_TYPE_DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXT TYPE_DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXT} value to the {@code type} field. */ - public XrDebugUtilsMessengerCallbackDataEXT type$Default() { return type(EXTDebugUtils.XR_TYPE_DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXT); } - /** Sets the specified value to the {@code next} field. */ - public XrDebugUtilsMessengerCallbackDataEXT next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the address of the specified encoded string to the {@code messageId} field. */ - public XrDebugUtilsMessengerCallbackDataEXT messageId(@NativeType("char const *") ByteBuffer value) { nmessageId(address(), value); return this; } - /** Sets the address of the specified encoded string to the {@code functionName} field. */ - public XrDebugUtilsMessengerCallbackDataEXT functionName(@NativeType("char const *") ByteBuffer value) { nfunctionName(address(), value); return this; } - /** Sets the address of the specified encoded string to the {@code message} field. */ - public XrDebugUtilsMessengerCallbackDataEXT message(@NativeType("char const *") ByteBuffer value) { nmessage(address(), value); return this; } - /** Sets the specified value to the {@code objectCount} field. */ - public XrDebugUtilsMessengerCallbackDataEXT objectCount(@NativeType("uint32_t") int value) { nobjectCount(address(), value); return this; } - /** Sets the address of the specified {@link XrDebugUtilsObjectNameInfoEXT.Buffer} to the {@code objects} field. */ - public XrDebugUtilsMessengerCallbackDataEXT objects(@Nullable @NativeType("XrDebugUtilsObjectNameInfoEXT *") XrDebugUtilsObjectNameInfoEXT.Buffer value) { nobjects(address(), value); return this; } - /** Sets the specified value to the {@code sessionLabelCount} field. */ - public XrDebugUtilsMessengerCallbackDataEXT sessionLabelCount(@NativeType("uint32_t") int value) { nsessionLabelCount(address(), value); return this; } - /** Sets the address of the specified {@link XrDebugUtilsLabelEXT.Buffer} to the {@code sessionLabels} field. */ - public XrDebugUtilsMessengerCallbackDataEXT sessionLabels(@Nullable @NativeType("XrDebugUtilsLabelEXT *") XrDebugUtilsLabelEXT.Buffer value) { nsessionLabels(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrDebugUtilsMessengerCallbackDataEXT set( - int type, - long next, - ByteBuffer messageId, - ByteBuffer functionName, - ByteBuffer message, - int objectCount, - @Nullable XrDebugUtilsObjectNameInfoEXT.Buffer objects, - int sessionLabelCount, - @Nullable XrDebugUtilsLabelEXT.Buffer sessionLabels - ) { - type(type); - next(next); - messageId(messageId); - functionName(functionName); - message(message); - objectCount(objectCount); - objects(objects); - sessionLabelCount(sessionLabelCount); - sessionLabels(sessionLabels); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrDebugUtilsMessengerCallbackDataEXT set(XrDebugUtilsMessengerCallbackDataEXT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrDebugUtilsMessengerCallbackDataEXT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrDebugUtilsMessengerCallbackDataEXT malloc() { - return wrap(XrDebugUtilsMessengerCallbackDataEXT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrDebugUtilsMessengerCallbackDataEXT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrDebugUtilsMessengerCallbackDataEXT calloc() { - return wrap(XrDebugUtilsMessengerCallbackDataEXT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrDebugUtilsMessengerCallbackDataEXT} instance allocated with {@link BufferUtils}. */ - public static XrDebugUtilsMessengerCallbackDataEXT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrDebugUtilsMessengerCallbackDataEXT.class, memAddress(container), container); - } - - /** Returns a new {@code XrDebugUtilsMessengerCallbackDataEXT} instance for the specified memory address. */ - public static XrDebugUtilsMessengerCallbackDataEXT create(long address) { - return wrap(XrDebugUtilsMessengerCallbackDataEXT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrDebugUtilsMessengerCallbackDataEXT createSafe(long address) { - return address == NULL ? null : wrap(XrDebugUtilsMessengerCallbackDataEXT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrDebugUtilsMessengerCallbackDataEXT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrDebugUtilsMessengerCallbackDataEXT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrDebugUtilsMessengerCallbackDataEXT malloc(MemoryStack stack) { - return wrap(XrDebugUtilsMessengerCallbackDataEXT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrDebugUtilsMessengerCallbackDataEXT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrDebugUtilsMessengerCallbackDataEXT calloc(MemoryStack stack) { - return wrap(XrDebugUtilsMessengerCallbackDataEXT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrDebugUtilsMessengerCallbackDataEXT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrDebugUtilsMessengerCallbackDataEXT.NEXT); } - /** Unsafe version of {@link #messageId}. */ - public static ByteBuffer nmessageId(long struct) { return memByteBufferNT1(memGetAddress(struct + XrDebugUtilsMessengerCallbackDataEXT.MESSAGEID)); } - /** Unsafe version of {@link #messageIdString}. */ - public static String nmessageIdString(long struct) { return memUTF8(memGetAddress(struct + XrDebugUtilsMessengerCallbackDataEXT.MESSAGEID)); } - /** Unsafe version of {@link #functionName}. */ - public static ByteBuffer nfunctionName(long struct) { return memByteBufferNT1(memGetAddress(struct + XrDebugUtilsMessengerCallbackDataEXT.FUNCTIONNAME)); } - /** Unsafe version of {@link #functionNameString}. */ - public static String nfunctionNameString(long struct) { return memUTF8(memGetAddress(struct + XrDebugUtilsMessengerCallbackDataEXT.FUNCTIONNAME)); } - /** Unsafe version of {@link #message}. */ - public static ByteBuffer nmessage(long struct) { return memByteBufferNT1(memGetAddress(struct + XrDebugUtilsMessengerCallbackDataEXT.MESSAGE)); } - /** Unsafe version of {@link #messageString}. */ - public static String nmessageString(long struct) { return memUTF8(memGetAddress(struct + XrDebugUtilsMessengerCallbackDataEXT.MESSAGE)); } - /** Unsafe version of {@link #objectCount}. */ - public static int nobjectCount(long struct) { return UNSAFE.getInt(null, struct + XrDebugUtilsMessengerCallbackDataEXT.OBJECTCOUNT); } - /** Unsafe version of {@link #objects}. */ - @Nullable public static XrDebugUtilsObjectNameInfoEXT.Buffer nobjects(long struct) { return XrDebugUtilsObjectNameInfoEXT.createSafe(memGetAddress(struct + XrDebugUtilsMessengerCallbackDataEXT.OBJECTS), nobjectCount(struct)); } - /** Unsafe version of {@link #sessionLabelCount}. */ - public static int nsessionLabelCount(long struct) { return UNSAFE.getInt(null, struct + XrDebugUtilsMessengerCallbackDataEXT.SESSIONLABELCOUNT); } - /** Unsafe version of {@link #sessionLabels}. */ - @Nullable public static XrDebugUtilsLabelEXT.Buffer nsessionLabels(long struct) { return XrDebugUtilsLabelEXT.createSafe(memGetAddress(struct + XrDebugUtilsMessengerCallbackDataEXT.SESSIONLABELS), nsessionLabelCount(struct)); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrDebugUtilsMessengerCallbackDataEXT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrDebugUtilsMessengerCallbackDataEXT.NEXT, value); } - /** Unsafe version of {@link #messageId(ByteBuffer) messageId}. */ - public static void nmessageId(long struct, ByteBuffer value) { - if (CHECKS) { checkNT1(value); } - memPutAddress(struct + XrDebugUtilsMessengerCallbackDataEXT.MESSAGEID, memAddress(value)); - } - /** Unsafe version of {@link #functionName(ByteBuffer) functionName}. */ - public static void nfunctionName(long struct, ByteBuffer value) { - if (CHECKS) { checkNT1(value); } - memPutAddress(struct + XrDebugUtilsMessengerCallbackDataEXT.FUNCTIONNAME, memAddress(value)); - } - /** Unsafe version of {@link #message(ByteBuffer) message}. */ - public static void nmessage(long struct, ByteBuffer value) { - if (CHECKS) { checkNT1(value); } - memPutAddress(struct + XrDebugUtilsMessengerCallbackDataEXT.MESSAGE, memAddress(value)); - } - /** Sets the specified value to the {@code objectCount} field of the specified {@code struct}. */ - public static void nobjectCount(long struct, int value) { UNSAFE.putInt(null, struct + XrDebugUtilsMessengerCallbackDataEXT.OBJECTCOUNT, value); } - /** Unsafe version of {@link #objects(XrDebugUtilsObjectNameInfoEXT.Buffer) objects}. */ - public static void nobjects(long struct, @Nullable XrDebugUtilsObjectNameInfoEXT.Buffer value) { memPutAddress(struct + XrDebugUtilsMessengerCallbackDataEXT.OBJECTS, memAddressSafe(value)); if (value != null) { nobjectCount(struct, value.remaining()); } } - /** Sets the specified value to the {@code sessionLabelCount} field of the specified {@code struct}. */ - public static void nsessionLabelCount(long struct, int value) { UNSAFE.putInt(null, struct + XrDebugUtilsMessengerCallbackDataEXT.SESSIONLABELCOUNT, value); } - /** Unsafe version of {@link #sessionLabels(XrDebugUtilsLabelEXT.Buffer) sessionLabels}. */ - public static void nsessionLabels(long struct, @Nullable XrDebugUtilsLabelEXT.Buffer value) { memPutAddress(struct + XrDebugUtilsMessengerCallbackDataEXT.SESSIONLABELS, memAddressSafe(value)); if (value != null) { nsessionLabelCount(struct, value.remaining()); } } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XrDebugUtilsMessengerCallbackDataEXT.MESSAGEID)); - check(memGetAddress(struct + XrDebugUtilsMessengerCallbackDataEXT.FUNCTIONNAME)); - check(memGetAddress(struct + XrDebugUtilsMessengerCallbackDataEXT.MESSAGE)); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrDebugUtilsMessengerCallbackDataEXT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrDebugUtilsMessengerCallbackDataEXT ELEMENT_FACTORY = XrDebugUtilsMessengerCallbackDataEXT.create(-1L); - - /** - * Creates a new {@code XrDebugUtilsMessengerCallbackDataEXT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrDebugUtilsMessengerCallbackDataEXT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrDebugUtilsMessengerCallbackDataEXT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrDebugUtilsMessengerCallbackDataEXT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrDebugUtilsMessengerCallbackDataEXT.nnext(address()); } - /** @return a {@link ByteBuffer} view of the null-terminated string pointed to by the {@code messageId} field. */ - @NativeType("char const *") - public ByteBuffer messageId() { return XrDebugUtilsMessengerCallbackDataEXT.nmessageId(address()); } - /** @return the null-terminated string pointed to by the {@code messageId} field. */ - @NativeType("char const *") - public String messageIdString() { return XrDebugUtilsMessengerCallbackDataEXT.nmessageIdString(address()); } - /** @return a {@link ByteBuffer} view of the null-terminated string pointed to by the {@code functionName} field. */ - @NativeType("char const *") - public ByteBuffer functionName() { return XrDebugUtilsMessengerCallbackDataEXT.nfunctionName(address()); } - /** @return the null-terminated string pointed to by the {@code functionName} field. */ - @NativeType("char const *") - public String functionNameString() { return XrDebugUtilsMessengerCallbackDataEXT.nfunctionNameString(address()); } - /** @return a {@link ByteBuffer} view of the null-terminated string pointed to by the {@code message} field. */ - @NativeType("char const *") - public ByteBuffer message() { return XrDebugUtilsMessengerCallbackDataEXT.nmessage(address()); } - /** @return the null-terminated string pointed to by the {@code message} field. */ - @NativeType("char const *") - public String messageString() { return XrDebugUtilsMessengerCallbackDataEXT.nmessageString(address()); } - /** @return the value of the {@code objectCount} field. */ - @NativeType("uint32_t") - public int objectCount() { return XrDebugUtilsMessengerCallbackDataEXT.nobjectCount(address()); } - /** @return a {@link XrDebugUtilsObjectNameInfoEXT.Buffer} view of the struct array pointed to by the {@code objects} field. */ - @Nullable - @NativeType("XrDebugUtilsObjectNameInfoEXT *") - public XrDebugUtilsObjectNameInfoEXT.Buffer objects() { return XrDebugUtilsMessengerCallbackDataEXT.nobjects(address()); } - /** @return the value of the {@code sessionLabelCount} field. */ - @NativeType("uint32_t") - public int sessionLabelCount() { return XrDebugUtilsMessengerCallbackDataEXT.nsessionLabelCount(address()); } - /** @return a {@link XrDebugUtilsLabelEXT.Buffer} view of the struct array pointed to by the {@code sessionLabels} field. */ - @Nullable - @NativeType("XrDebugUtilsLabelEXT *") - public XrDebugUtilsLabelEXT.Buffer sessionLabels() { return XrDebugUtilsMessengerCallbackDataEXT.nsessionLabels(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrDebugUtilsMessengerCallbackDataEXT.ntype(address(), value); return this; } - /** Sets the {@link EXTDebugUtils#XR_TYPE_DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXT TYPE_DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXT} value to the {@code type} field. */ - public Buffer type$Default() { return type(EXTDebugUtils.XR_TYPE_DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrDebugUtilsMessengerCallbackDataEXT.nnext(address(), value); return this; } - /** Sets the address of the specified encoded string to the {@code messageId} field. */ - public Buffer messageId(@NativeType("char const *") ByteBuffer value) { XrDebugUtilsMessengerCallbackDataEXT.nmessageId(address(), value); return this; } - /** Sets the address of the specified encoded string to the {@code functionName} field. */ - public Buffer functionName(@NativeType("char const *") ByteBuffer value) { XrDebugUtilsMessengerCallbackDataEXT.nfunctionName(address(), value); return this; } - /** Sets the address of the specified encoded string to the {@code message} field. */ - public Buffer message(@NativeType("char const *") ByteBuffer value) { XrDebugUtilsMessengerCallbackDataEXT.nmessage(address(), value); return this; } - /** Sets the specified value to the {@code objectCount} field. */ - public Buffer objectCount(@NativeType("uint32_t") int value) { XrDebugUtilsMessengerCallbackDataEXT.nobjectCount(address(), value); return this; } - /** Sets the address of the specified {@link XrDebugUtilsObjectNameInfoEXT.Buffer} to the {@code objects} field. */ - public Buffer objects(@Nullable @NativeType("XrDebugUtilsObjectNameInfoEXT *") XrDebugUtilsObjectNameInfoEXT.Buffer value) { XrDebugUtilsMessengerCallbackDataEXT.nobjects(address(), value); return this; } - /** Sets the specified value to the {@code sessionLabelCount} field. */ - public Buffer sessionLabelCount(@NativeType("uint32_t") int value) { XrDebugUtilsMessengerCallbackDataEXT.nsessionLabelCount(address(), value); return this; } - /** Sets the address of the specified {@link XrDebugUtilsLabelEXT.Buffer} to the {@code sessionLabels} field. */ - public Buffer sessionLabels(@Nullable @NativeType("XrDebugUtilsLabelEXT *") XrDebugUtilsLabelEXT.Buffer value) { XrDebugUtilsMessengerCallbackDataEXT.nsessionLabels(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrDebugUtilsMessengerCallbackEXT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrDebugUtilsMessengerCallbackEXT.java deleted file mode 100644 index 145f023c..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrDebugUtilsMessengerCallbackEXT.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.system.Callback; - -import static org.lwjgl.system.MemoryUtil.NULL; - -public abstract class XrDebugUtilsMessengerCallbackEXT extends Callback implements XrDebugUtilsMessengerCallbackEXTI { - - /** - * Creates a {@code XrDebugUtilsMessengerCallbackEXT} instance from the specified function pointer. - * - * @return the new {@code XrDebugUtilsMessengerCallbackEXT} - */ - public static XrDebugUtilsMessengerCallbackEXT create(long functionPointer) { - XrDebugUtilsMessengerCallbackEXTI instance = Callback.get(functionPointer); - return instance instanceof XrDebugUtilsMessengerCallbackEXT - ? (XrDebugUtilsMessengerCallbackEXT)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static XrDebugUtilsMessengerCallbackEXT createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code XrDebugUtilsMessengerCallbackEXT} instance that delegates to the specified {@code XrDebugUtilsMessengerCallbackEXTI} instance. */ - public static XrDebugUtilsMessengerCallbackEXT create(XrDebugUtilsMessengerCallbackEXTI instance) { - return instance instanceof XrDebugUtilsMessengerCallbackEXT - ? (XrDebugUtilsMessengerCallbackEXT)instance - : new Container(instance.address(), instance); - } - - protected XrDebugUtilsMessengerCallbackEXT() { - super(SIGNATURE); - } - - XrDebugUtilsMessengerCallbackEXT(long functionPointer) { - super(functionPointer); - } - - private static final class Container extends XrDebugUtilsMessengerCallbackEXT { - - private final XrDebugUtilsMessengerCallbackEXTI delegate; - - Container(long functionPointer, XrDebugUtilsMessengerCallbackEXTI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public int invoke(long messageSeverity, long messageTypes, long callbackData, long userData) { - return delegate.invoke(messageSeverity, messageTypes, callbackData, userData); - } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrDebugUtilsMessengerCallbackEXTI.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrDebugUtilsMessengerCallbackEXTI.java deleted file mode 100644 index 9ac2fce2..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrDebugUtilsMessengerCallbackEXTI.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.lwjgl.system.Callback; -import org.lwjgl.system.CallbackI; -import org.lwjgl.system.NativeType; - -import static org.lwjgl.system.dyncall.DynCallback.dcbArgLongLong; -import static org.lwjgl.system.dyncall.DynCallback.dcbArgPointer; - -@FunctionalInterface -@NativeType("PFN_xrDebugUtilsMessengerCallbackEXT") -public interface XrDebugUtilsMessengerCallbackEXTI extends CallbackI.I { - - String SIGNATURE = Callback.__stdcall("(llpp)i"); - - @Override - default String getSignature() { return SIGNATURE; } - - @Override - default int callback(long args) { - return invoke( - dcbArgLongLong(args), - dcbArgLongLong(args), - dcbArgPointer(args), - dcbArgPointer(args) - ); - } - - @NativeType("XrBool32") int invoke(@NativeType("XrDebugUtilsMessageSeverityFlagsEXT") long messageSeverity, @NativeType("XrDebugUtilsMessageTypeFlagsEXT") long messageTypes, @NativeType("XrDebugUtilsMessengerCallbackDataEXT const *") long callbackData, @NativeType("void *") long userData); - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrDebugUtilsMessengerCreateInfoEXT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrDebugUtilsMessengerCreateInfoEXT.java deleted file mode 100644 index baecff0e..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrDebugUtilsMessengerCreateInfoEXT.java +++ /dev/null @@ -1,381 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrDebugUtilsMessengerCreateInfoEXT {
- *     XrStructureType type;
- *     void const * next;
- *     XrDebugUtilsMessageSeverityFlagsEXT messageSeverities;
- *     XrDebugUtilsMessageTypeFlagsEXT messageTypes;
- *     {@link XrDebugUtilsMessengerCallbackEXTI PFN_xrDebugUtilsMessengerCallbackEXT} userCallback;
- *     void * userData;
- * }
- */ -public class XrDebugUtilsMessengerCreateInfoEXT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - MESSAGESEVERITIES, - MESSAGETYPES, - USERCALLBACK, - USERDATA; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(8), - __member(8), - __member(POINTER_SIZE), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - MESSAGESEVERITIES = layout.offsetof(2); - MESSAGETYPES = layout.offsetof(3); - USERCALLBACK = layout.offsetof(4); - USERDATA = layout.offsetof(5); - } - - /** - * Creates a {@code XrDebugUtilsMessengerCreateInfoEXT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrDebugUtilsMessengerCreateInfoEXT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code messageSeverities} field. */ - @NativeType("XrDebugUtilsMessageSeverityFlagsEXT") - public long messageSeverities() { return nmessageSeverities(address()); } - /** @return the value of the {@code messageTypes} field. */ - @NativeType("XrDebugUtilsMessageTypeFlagsEXT") - public long messageTypes() { return nmessageTypes(address()); } - /** @return the value of the {@code userCallback} field. */ - @NativeType("PFN_xrDebugUtilsMessengerCallbackEXT") - public XrDebugUtilsMessengerCallbackEXT userCallback() { return nuserCallback(address()); } - /** @return the value of the {@code userData} field. */ - @NativeType("void *") - public long userData() { return nuserData(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrDebugUtilsMessengerCreateInfoEXT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link EXTDebugUtils#XR_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT} value to the {@code type} field. */ - public XrDebugUtilsMessengerCreateInfoEXT type$Default() { return type(EXTDebugUtils.XR_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT); } - /** Sets the specified value to the {@code next} field. */ - public XrDebugUtilsMessengerCreateInfoEXT next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code messageSeverities} field. */ - public XrDebugUtilsMessengerCreateInfoEXT messageSeverities(@NativeType("XrDebugUtilsMessageSeverityFlagsEXT") long value) { nmessageSeverities(address(), value); return this; } - /** Sets the specified value to the {@code messageTypes} field. */ - public XrDebugUtilsMessengerCreateInfoEXT messageTypes(@NativeType("XrDebugUtilsMessageTypeFlagsEXT") long value) { nmessageTypes(address(), value); return this; } - /** Sets the specified value to the {@code userCallback} field. */ - public XrDebugUtilsMessengerCreateInfoEXT userCallback(@NativeType("PFN_xrDebugUtilsMessengerCallbackEXT") XrDebugUtilsMessengerCallbackEXTI value) { nuserCallback(address(), value); return this; } - /** Sets the specified value to the {@code userData} field. */ - public XrDebugUtilsMessengerCreateInfoEXT userData(@NativeType("void *") long value) { nuserData(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrDebugUtilsMessengerCreateInfoEXT set( - int type, - long next, - long messageSeverities, - long messageTypes, - XrDebugUtilsMessengerCallbackEXTI userCallback, - long userData - ) { - type(type); - next(next); - messageSeverities(messageSeverities); - messageTypes(messageTypes); - userCallback(userCallback); - userData(userData); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrDebugUtilsMessengerCreateInfoEXT set(XrDebugUtilsMessengerCreateInfoEXT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrDebugUtilsMessengerCreateInfoEXT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrDebugUtilsMessengerCreateInfoEXT malloc() { - return wrap(XrDebugUtilsMessengerCreateInfoEXT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrDebugUtilsMessengerCreateInfoEXT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrDebugUtilsMessengerCreateInfoEXT calloc() { - return wrap(XrDebugUtilsMessengerCreateInfoEXT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrDebugUtilsMessengerCreateInfoEXT} instance allocated with {@link BufferUtils}. */ - public static XrDebugUtilsMessengerCreateInfoEXT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrDebugUtilsMessengerCreateInfoEXT.class, memAddress(container), container); - } - - /** Returns a new {@code XrDebugUtilsMessengerCreateInfoEXT} instance for the specified memory address. */ - public static XrDebugUtilsMessengerCreateInfoEXT create(long address) { - return wrap(XrDebugUtilsMessengerCreateInfoEXT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrDebugUtilsMessengerCreateInfoEXT createSafe(long address) { - return address == NULL ? null : wrap(XrDebugUtilsMessengerCreateInfoEXT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrDebugUtilsMessengerCreateInfoEXT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrDebugUtilsMessengerCreateInfoEXT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrDebugUtilsMessengerCreateInfoEXT malloc(MemoryStack stack) { - return wrap(XrDebugUtilsMessengerCreateInfoEXT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrDebugUtilsMessengerCreateInfoEXT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrDebugUtilsMessengerCreateInfoEXT calloc(MemoryStack stack) { - return wrap(XrDebugUtilsMessengerCreateInfoEXT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrDebugUtilsMessengerCreateInfoEXT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrDebugUtilsMessengerCreateInfoEXT.NEXT); } - /** Unsafe version of {@link #messageSeverities}. */ - public static long nmessageSeverities(long struct) { return UNSAFE.getLong(null, struct + XrDebugUtilsMessengerCreateInfoEXT.MESSAGESEVERITIES); } - /** Unsafe version of {@link #messageTypes}. */ - public static long nmessageTypes(long struct) { return UNSAFE.getLong(null, struct + XrDebugUtilsMessengerCreateInfoEXT.MESSAGETYPES); } - /** Unsafe version of {@link #userCallback}. */ - public static XrDebugUtilsMessengerCallbackEXT nuserCallback(long struct) { return XrDebugUtilsMessengerCallbackEXT.create(memGetAddress(struct + XrDebugUtilsMessengerCreateInfoEXT.USERCALLBACK)); } - /** Unsafe version of {@link #userData}. */ - public static long nuserData(long struct) { return memGetAddress(struct + XrDebugUtilsMessengerCreateInfoEXT.USERDATA); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrDebugUtilsMessengerCreateInfoEXT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrDebugUtilsMessengerCreateInfoEXT.NEXT, value); } - /** Unsafe version of {@link #messageSeverities(long) messageSeverities}. */ - public static void nmessageSeverities(long struct, long value) { UNSAFE.putLong(null, struct + XrDebugUtilsMessengerCreateInfoEXT.MESSAGESEVERITIES, value); } - /** Unsafe version of {@link #messageTypes(long) messageTypes}. */ - public static void nmessageTypes(long struct, long value) { UNSAFE.putLong(null, struct + XrDebugUtilsMessengerCreateInfoEXT.MESSAGETYPES, value); } - /** Unsafe version of {@link #userCallback(XrDebugUtilsMessengerCallbackEXTI) userCallback}. */ - public static void nuserCallback(long struct, XrDebugUtilsMessengerCallbackEXTI value) { memPutAddress(struct + XrDebugUtilsMessengerCreateInfoEXT.USERCALLBACK, value.address()); } - /** Unsafe version of {@link #userData(long) userData}. */ - public static void nuserData(long struct, long value) { memPutAddress(struct + XrDebugUtilsMessengerCreateInfoEXT.USERDATA, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XrDebugUtilsMessengerCreateInfoEXT.USERCALLBACK)); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrDebugUtilsMessengerCreateInfoEXT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrDebugUtilsMessengerCreateInfoEXT ELEMENT_FACTORY = XrDebugUtilsMessengerCreateInfoEXT.create(-1L); - - /** - * Creates a new {@code XrDebugUtilsMessengerCreateInfoEXT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrDebugUtilsMessengerCreateInfoEXT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrDebugUtilsMessengerCreateInfoEXT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrDebugUtilsMessengerCreateInfoEXT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrDebugUtilsMessengerCreateInfoEXT.nnext(address()); } - /** @return the value of the {@code messageSeverities} field. */ - @NativeType("XrDebugUtilsMessageSeverityFlagsEXT") - public long messageSeverities() { return XrDebugUtilsMessengerCreateInfoEXT.nmessageSeverities(address()); } - /** @return the value of the {@code messageTypes} field. */ - @NativeType("XrDebugUtilsMessageTypeFlagsEXT") - public long messageTypes() { return XrDebugUtilsMessengerCreateInfoEXT.nmessageTypes(address()); } - /** @return the value of the {@code userCallback} field. */ - @NativeType("PFN_xrDebugUtilsMessengerCallbackEXT") - public XrDebugUtilsMessengerCallbackEXT userCallback() { return XrDebugUtilsMessengerCreateInfoEXT.nuserCallback(address()); } - /** @return the value of the {@code userData} field. */ - @NativeType("void *") - public long userData() { return XrDebugUtilsMessengerCreateInfoEXT.nuserData(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrDebugUtilsMessengerCreateInfoEXT.ntype(address(), value); return this; } - /** Sets the {@link EXTDebugUtils#XR_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT} value to the {@code type} field. */ - public Buffer type$Default() { return type(EXTDebugUtils.XR_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrDebugUtilsMessengerCreateInfoEXT.nnext(address(), value); return this; } - /** Sets the specified value to the {@code messageSeverities} field. */ - public Buffer messageSeverities(@NativeType("XrDebugUtilsMessageSeverityFlagsEXT") long value) { XrDebugUtilsMessengerCreateInfoEXT.nmessageSeverities(address(), value); return this; } - /** Sets the specified value to the {@code messageTypes} field. */ - public Buffer messageTypes(@NativeType("XrDebugUtilsMessageTypeFlagsEXT") long value) { XrDebugUtilsMessengerCreateInfoEXT.nmessageTypes(address(), value); return this; } - /** Sets the specified value to the {@code userCallback} field. */ - public Buffer userCallback(@NativeType("PFN_xrDebugUtilsMessengerCallbackEXT") XrDebugUtilsMessengerCallbackEXTI value) { XrDebugUtilsMessengerCreateInfoEXT.nuserCallback(address(), value); return this; } - /** Sets the specified value to the {@code userData} field. */ - public Buffer userData(@NativeType("void *") long value) { XrDebugUtilsMessengerCreateInfoEXT.nuserData(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrDebugUtilsMessengerEXT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrDebugUtilsMessengerEXT.java deleted file mode 100644 index 231611d0..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrDebugUtilsMessengerEXT.java +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.openxr; - -public class XrDebugUtilsMessengerEXT extends DispatchableHandle { - public XrDebugUtilsMessengerEXT(long handle, DispatchableHandle session) { - super(handle, session.getCapabilities()); - } - - public XrDebugUtilsMessengerEXT(long handle, XRCapabilities capabilities) { - super(handle, capabilities); - } -} diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrDebugUtilsObjectNameInfoEXT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrDebugUtilsObjectNameInfoEXT.java deleted file mode 100644 index a5c31cce..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrDebugUtilsObjectNameInfoEXT.java +++ /dev/null @@ -1,356 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.CHECKS; -import static org.lwjgl.system.Checks.checkNT1Safe; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrDebugUtilsObjectNameInfoEXT {
- *     XrStructureType type;
- *     void const * next;
- *     XrObjectType objectType;
- *     uint64_t objectHandle;
- *     char const * objectName;
- * }
- */ -public class XrDebugUtilsObjectNameInfoEXT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - OBJECTTYPE, - OBJECTHANDLE, - OBJECTNAME; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(8), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - OBJECTTYPE = layout.offsetof(2); - OBJECTHANDLE = layout.offsetof(3); - OBJECTNAME = layout.offsetof(4); - } - - /** - * Creates a {@code XrDebugUtilsObjectNameInfoEXT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrDebugUtilsObjectNameInfoEXT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code objectType} field. */ - @NativeType("XrObjectType") - public int objectType() { return nobjectType(address()); } - /** @return the value of the {@code objectHandle} field. */ - @NativeType("uint64_t") - public long objectHandle() { return nobjectHandle(address()); } - /** @return a {@link ByteBuffer} view of the null-terminated string pointed to by the {@code objectName} field. */ - @Nullable - @NativeType("char const *") - public ByteBuffer objectName() { return nobjectName(address()); } - /** @return the null-terminated string pointed to by the {@code objectName} field. */ - @Nullable - @NativeType("char const *") - public String objectNameString() { return nobjectNameString(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrDebugUtilsObjectNameInfoEXT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link EXTDebugUtils#XR_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT} value to the {@code type} field. */ - public XrDebugUtilsObjectNameInfoEXT type$Default() { return type(EXTDebugUtils.XR_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT); } - /** Sets the specified value to the {@code next} field. */ - public XrDebugUtilsObjectNameInfoEXT next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code objectType} field. */ - public XrDebugUtilsObjectNameInfoEXT objectType(@NativeType("XrObjectType") int value) { nobjectType(address(), value); return this; } - /** Sets the specified value to the {@code objectHandle} field. */ - public XrDebugUtilsObjectNameInfoEXT objectHandle(@NativeType("uint64_t") long value) { nobjectHandle(address(), value); return this; } - /** Sets the address of the specified encoded string to the {@code objectName} field. */ - public XrDebugUtilsObjectNameInfoEXT objectName(@Nullable @NativeType("char const *") ByteBuffer value) { nobjectName(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrDebugUtilsObjectNameInfoEXT set( - int type, - long next, - int objectType, - long objectHandle, - @Nullable ByteBuffer objectName - ) { - type(type); - next(next); - objectType(objectType); - objectHandle(objectHandle); - objectName(objectName); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrDebugUtilsObjectNameInfoEXT set(XrDebugUtilsObjectNameInfoEXT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrDebugUtilsObjectNameInfoEXT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrDebugUtilsObjectNameInfoEXT malloc() { - return wrap(XrDebugUtilsObjectNameInfoEXT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrDebugUtilsObjectNameInfoEXT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrDebugUtilsObjectNameInfoEXT calloc() { - return wrap(XrDebugUtilsObjectNameInfoEXT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrDebugUtilsObjectNameInfoEXT} instance allocated with {@link BufferUtils}. */ - public static XrDebugUtilsObjectNameInfoEXT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrDebugUtilsObjectNameInfoEXT.class, memAddress(container), container); - } - - /** Returns a new {@code XrDebugUtilsObjectNameInfoEXT} instance for the specified memory address. */ - public static XrDebugUtilsObjectNameInfoEXT create(long address) { - return wrap(XrDebugUtilsObjectNameInfoEXT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrDebugUtilsObjectNameInfoEXT createSafe(long address) { - return address == NULL ? null : wrap(XrDebugUtilsObjectNameInfoEXT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrDebugUtilsObjectNameInfoEXT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrDebugUtilsObjectNameInfoEXT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrDebugUtilsObjectNameInfoEXT malloc(MemoryStack stack) { - return wrap(XrDebugUtilsObjectNameInfoEXT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrDebugUtilsObjectNameInfoEXT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrDebugUtilsObjectNameInfoEXT calloc(MemoryStack stack) { - return wrap(XrDebugUtilsObjectNameInfoEXT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrDebugUtilsObjectNameInfoEXT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrDebugUtilsObjectNameInfoEXT.NEXT); } - /** Unsafe version of {@link #objectType}. */ - public static int nobjectType(long struct) { return UNSAFE.getInt(null, struct + XrDebugUtilsObjectNameInfoEXT.OBJECTTYPE); } - /** Unsafe version of {@link #objectHandle}. */ - public static long nobjectHandle(long struct) { return UNSAFE.getLong(null, struct + XrDebugUtilsObjectNameInfoEXT.OBJECTHANDLE); } - /** Unsafe version of {@link #objectName}. */ - @Nullable public static ByteBuffer nobjectName(long struct) { return memByteBufferNT1Safe(memGetAddress(struct + XrDebugUtilsObjectNameInfoEXT.OBJECTNAME)); } - /** Unsafe version of {@link #objectNameString}. */ - @Nullable public static String nobjectNameString(long struct) { return memUTF8Safe(memGetAddress(struct + XrDebugUtilsObjectNameInfoEXT.OBJECTNAME)); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrDebugUtilsObjectNameInfoEXT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrDebugUtilsObjectNameInfoEXT.NEXT, value); } - /** Unsafe version of {@link #objectType(int) objectType}. */ - public static void nobjectType(long struct, int value) { UNSAFE.putInt(null, struct + XrDebugUtilsObjectNameInfoEXT.OBJECTTYPE, value); } - /** Unsafe version of {@link #objectHandle(long) objectHandle}. */ - public static void nobjectHandle(long struct, long value) { UNSAFE.putLong(null, struct + XrDebugUtilsObjectNameInfoEXT.OBJECTHANDLE, value); } - /** Unsafe version of {@link #objectName(ByteBuffer) objectName}. */ - public static void nobjectName(long struct, @Nullable ByteBuffer value) { - if (CHECKS) { checkNT1Safe(value); } - memPutAddress(struct + XrDebugUtilsObjectNameInfoEXT.OBJECTNAME, memAddressSafe(value)); - } - - // ----------------------------------- - - /** An array of {@link XrDebugUtilsObjectNameInfoEXT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrDebugUtilsObjectNameInfoEXT ELEMENT_FACTORY = XrDebugUtilsObjectNameInfoEXT.create(-1L); - - /** - * Creates a new {@code XrDebugUtilsObjectNameInfoEXT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrDebugUtilsObjectNameInfoEXT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrDebugUtilsObjectNameInfoEXT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrDebugUtilsObjectNameInfoEXT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrDebugUtilsObjectNameInfoEXT.nnext(address()); } - /** @return the value of the {@code objectType} field. */ - @NativeType("XrObjectType") - public int objectType() { return XrDebugUtilsObjectNameInfoEXT.nobjectType(address()); } - /** @return the value of the {@code objectHandle} field. */ - @NativeType("uint64_t") - public long objectHandle() { return XrDebugUtilsObjectNameInfoEXT.nobjectHandle(address()); } - /** @return a {@link ByteBuffer} view of the null-terminated string pointed to by the {@code objectName} field. */ - @Nullable - @NativeType("char const *") - public ByteBuffer objectName() { return XrDebugUtilsObjectNameInfoEXT.nobjectName(address()); } - /** @return the null-terminated string pointed to by the {@code objectName} field. */ - @Nullable - @NativeType("char const *") - public String objectNameString() { return XrDebugUtilsObjectNameInfoEXT.nobjectNameString(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrDebugUtilsObjectNameInfoEXT.ntype(address(), value); return this; } - /** Sets the {@link EXTDebugUtils#XR_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT} value to the {@code type} field. */ - public Buffer type$Default() { return type(EXTDebugUtils.XR_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrDebugUtilsObjectNameInfoEXT.nnext(address(), value); return this; } - /** Sets the specified value to the {@code objectType} field. */ - public Buffer objectType(@NativeType("XrObjectType") int value) { XrDebugUtilsObjectNameInfoEXT.nobjectType(address(), value); return this; } - /** Sets the specified value to the {@code objectHandle} field. */ - public Buffer objectHandle(@NativeType("uint64_t") long value) { XrDebugUtilsObjectNameInfoEXT.nobjectHandle(address(), value); return this; } - /** Sets the address of the specified encoded string to the {@code objectName} field. */ - public Buffer objectName(@Nullable @NativeType("char const *") ByteBuffer value) { XrDebugUtilsObjectNameInfoEXT.nobjectName(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrDeserializeSceneFragmentMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrDeserializeSceneFragmentMSFT.java deleted file mode 100644 index 92fba2a1..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrDeserializeSceneFragmentMSFT.java +++ /dev/null @@ -1,277 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrDeserializeSceneFragmentMSFT {
- *     uint32_t bufferSize;
- *     uint8_t const * buffer;
- * }
- */ -public class XrDeserializeSceneFragmentMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - BUFFERSIZE, - BUFFER; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - BUFFERSIZE = layout.offsetof(0); - BUFFER = layout.offsetof(1); - } - - /** - * Creates a {@code XrDeserializeSceneFragmentMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrDeserializeSceneFragmentMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code bufferSize} field. */ - @NativeType("uint32_t") - public int bufferSize() { return nbufferSize(address()); } - /** @return a {@link ByteBuffer} view of the data pointed to by the {@code buffer} field. */ - @Nullable - @NativeType("uint8_t const *") - public ByteBuffer buffer() { return nbuffer(address()); } - - /** Sets the specified value to the {@code bufferSize} field. */ - public XrDeserializeSceneFragmentMSFT bufferSize(@NativeType("uint32_t") int value) { nbufferSize(address(), value); return this; } - /** Sets the address of the specified {@link ByteBuffer} to the {@code buffer} field. */ - public XrDeserializeSceneFragmentMSFT buffer(@Nullable @NativeType("uint8_t const *") ByteBuffer value) { nbuffer(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrDeserializeSceneFragmentMSFT set( - int bufferSize, - @Nullable ByteBuffer buffer - ) { - bufferSize(bufferSize); - buffer(buffer); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrDeserializeSceneFragmentMSFT set(XrDeserializeSceneFragmentMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrDeserializeSceneFragmentMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrDeserializeSceneFragmentMSFT malloc() { - return wrap(XrDeserializeSceneFragmentMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrDeserializeSceneFragmentMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrDeserializeSceneFragmentMSFT calloc() { - return wrap(XrDeserializeSceneFragmentMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrDeserializeSceneFragmentMSFT} instance allocated with {@link BufferUtils}. */ - public static XrDeserializeSceneFragmentMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrDeserializeSceneFragmentMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrDeserializeSceneFragmentMSFT} instance for the specified memory address. */ - public static XrDeserializeSceneFragmentMSFT create(long address) { - return wrap(XrDeserializeSceneFragmentMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrDeserializeSceneFragmentMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrDeserializeSceneFragmentMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrDeserializeSceneFragmentMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrDeserializeSceneFragmentMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrDeserializeSceneFragmentMSFT malloc(MemoryStack stack) { - return wrap(XrDeserializeSceneFragmentMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrDeserializeSceneFragmentMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrDeserializeSceneFragmentMSFT calloc(MemoryStack stack) { - return wrap(XrDeserializeSceneFragmentMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #bufferSize}. */ - public static int nbufferSize(long struct) { return UNSAFE.getInt(null, struct + XrDeserializeSceneFragmentMSFT.BUFFERSIZE); } - /** Unsafe version of {@link #buffer() buffer}. */ - @Nullable public static ByteBuffer nbuffer(long struct) { return memByteBufferSafe(memGetAddress(struct + XrDeserializeSceneFragmentMSFT.BUFFER), nbufferSize(struct)); } - - /** Sets the specified value to the {@code bufferSize} field of the specified {@code struct}. */ - public static void nbufferSize(long struct, int value) { UNSAFE.putInt(null, struct + XrDeserializeSceneFragmentMSFT.BUFFERSIZE, value); } - /** Unsafe version of {@link #buffer(ByteBuffer) buffer}. */ - public static void nbuffer(long struct, @Nullable ByteBuffer value) { memPutAddress(struct + XrDeserializeSceneFragmentMSFT.BUFFER, memAddressSafe(value)); if (value != null) { nbufferSize(struct, value.remaining()); } } - - // ----------------------------------- - - /** An array of {@link XrDeserializeSceneFragmentMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrDeserializeSceneFragmentMSFT ELEMENT_FACTORY = XrDeserializeSceneFragmentMSFT.create(-1L); - - /** - * Creates a new {@code XrDeserializeSceneFragmentMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrDeserializeSceneFragmentMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrDeserializeSceneFragmentMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code bufferSize} field. */ - @NativeType("uint32_t") - public int bufferSize() { return XrDeserializeSceneFragmentMSFT.nbufferSize(address()); } - /** @return a {@link ByteBuffer} view of the data pointed to by the {@code buffer} field. */ - @Nullable - @NativeType("uint8_t const *") - public ByteBuffer buffer() { return XrDeserializeSceneFragmentMSFT.nbuffer(address()); } - - /** Sets the specified value to the {@code bufferSize} field. */ - public Buffer bufferSize(@NativeType("uint32_t") int value) { XrDeserializeSceneFragmentMSFT.nbufferSize(address(), value); return this; } - /** Sets the address of the specified {@link ByteBuffer} to the {@code buffer} field. */ - public Buffer buffer(@Nullable @NativeType("uint8_t const *") ByteBuffer value) { XrDeserializeSceneFragmentMSFT.nbuffer(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrEventDataBaseHeader.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrEventDataBaseHeader.java deleted file mode 100644 index 1eae3036..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrEventDataBaseHeader.java +++ /dev/null @@ -1,275 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrEventDataBaseHeader {
- *     XrStructureType type;
- *     void const * next;
- * }
- */ -public class XrEventDataBaseHeader extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - } - - /** - * Creates a {@code XrEventDataBaseHeader} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrEventDataBaseHeader(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrEventDataBaseHeader type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the specified value to the {@code next} field. */ - public XrEventDataBaseHeader next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrEventDataBaseHeader set( - int type, - long next - ) { - type(type); - next(next); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrEventDataBaseHeader set(XrEventDataBaseHeader src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrEventDataBaseHeader} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrEventDataBaseHeader malloc() { - return wrap(XrEventDataBaseHeader.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrEventDataBaseHeader} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrEventDataBaseHeader calloc() { - return wrap(XrEventDataBaseHeader.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrEventDataBaseHeader} instance allocated with {@link BufferUtils}. */ - public static XrEventDataBaseHeader create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrEventDataBaseHeader.class, memAddress(container), container); - } - - /** Returns a new {@code XrEventDataBaseHeader} instance for the specified memory address. */ - public static XrEventDataBaseHeader create(long address) { - return wrap(XrEventDataBaseHeader.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrEventDataBaseHeader createSafe(long address) { - return address == NULL ? null : wrap(XrEventDataBaseHeader.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrEventDataBaseHeader.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrEventDataBaseHeader} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrEventDataBaseHeader malloc(MemoryStack stack) { - return wrap(XrEventDataBaseHeader.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrEventDataBaseHeader} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrEventDataBaseHeader calloc(MemoryStack stack) { - return wrap(XrEventDataBaseHeader.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrEventDataBaseHeader.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrEventDataBaseHeader.NEXT); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrEventDataBaseHeader.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrEventDataBaseHeader.NEXT, value); } - - // ----------------------------------- - - /** An array of {@link XrEventDataBaseHeader} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrEventDataBaseHeader ELEMENT_FACTORY = XrEventDataBaseHeader.create(-1L); - - /** - * Creates a new {@code XrEventDataBaseHeader.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrEventDataBaseHeader#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrEventDataBaseHeader getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrEventDataBaseHeader.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrEventDataBaseHeader.nnext(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrEventDataBaseHeader.ntype(address(), value); return this; } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrEventDataBaseHeader.nnext(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrEventDataBuffer.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrEventDataBuffer.java deleted file mode 100644 index 3e9bb98c..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrEventDataBuffer.java +++ /dev/null @@ -1,321 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrEventDataBuffer {
- *     XrStructureType type;
- *     void const * next;
- *     uint8_t varying[4000];
- * }
- */ -public class XrEventDataBuffer extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - VARYING; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __array(1, 4000) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - VARYING = layout.offsetof(2); - } - - /** - * Creates a {@code XrEventDataBuffer} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrEventDataBuffer(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return a {@link ByteBuffer} view of the {@code varying} field. */ - @NativeType("uint8_t[4000]") - public ByteBuffer varying() { return nvarying(address()); } - /** @return the value at the specified index of the {@code varying} field. */ - @NativeType("uint8_t") - public byte varying(int index) { return nvarying(address(), index); } - - /** Sets the specified value to the {@code type} field. */ - public XrEventDataBuffer type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_EVENT_DATA_BUFFER TYPE_EVENT_DATA_BUFFER} value to the {@code type} field. */ - public XrEventDataBuffer type$Default() { return type(XR10.XR_TYPE_EVENT_DATA_BUFFER); } - /** Sets the specified value to the {@code next} field. */ - public XrEventDataBuffer next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Copies the specified {@link ByteBuffer} to the {@code varying} field. */ - public XrEventDataBuffer varying(@NativeType("uint8_t[4000]") ByteBuffer value) { nvarying(address(), value); return this; } - /** Sets the specified value at the specified index of the {@code varying} field. */ - public XrEventDataBuffer varying(int index, @NativeType("uint8_t") byte value) { nvarying(address(), index, value); return this; } - - /** Initializes this struct with the specified values. */ - public XrEventDataBuffer set( - int type, - long next, - ByteBuffer varying - ) { - type(type); - next(next); - varying(varying); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrEventDataBuffer set(XrEventDataBuffer src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrEventDataBuffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrEventDataBuffer malloc() { - return wrap(XrEventDataBuffer.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrEventDataBuffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrEventDataBuffer calloc() { - return wrap(XrEventDataBuffer.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrEventDataBuffer} instance allocated with {@link BufferUtils}. */ - public static XrEventDataBuffer create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrEventDataBuffer.class, memAddress(container), container); - } - - /** Returns a new {@code XrEventDataBuffer} instance for the specified memory address. */ - public static XrEventDataBuffer create(long address) { - return wrap(XrEventDataBuffer.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrEventDataBuffer createSafe(long address) { - return address == NULL ? null : wrap(XrEventDataBuffer.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrEventDataBuffer.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrEventDataBuffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrEventDataBuffer malloc(MemoryStack stack) { - return wrap(XrEventDataBuffer.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrEventDataBuffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrEventDataBuffer calloc(MemoryStack stack) { - return wrap(XrEventDataBuffer.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrEventDataBuffer.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrEventDataBuffer.NEXT); } - /** Unsafe version of {@link #varying}. */ - public static ByteBuffer nvarying(long struct) { return memByteBuffer(struct + XrEventDataBuffer.VARYING, 4000); } - /** Unsafe version of {@link #varying(int) varying}. */ - public static byte nvarying(long struct, int index) { - return UNSAFE.getByte(null, struct + XrEventDataBuffer.VARYING + check(index, 4000) * 1); - } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrEventDataBuffer.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrEventDataBuffer.NEXT, value); } - /** Unsafe version of {@link #varying(ByteBuffer) varying}. */ - public static void nvarying(long struct, ByteBuffer value) { - if (CHECKS) { checkGT(value, 4000); } - memCopy(memAddress(value), struct + XrEventDataBuffer.VARYING, value.remaining() * 1); - } - /** Unsafe version of {@link #varying(int, byte) varying}. */ - public static void nvarying(long struct, int index, byte value) { - UNSAFE.putByte(null, struct + XrEventDataBuffer.VARYING + check(index, 4000) * 1, value); - } - - // ----------------------------------- - - /** An array of {@link XrEventDataBuffer} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrEventDataBuffer ELEMENT_FACTORY = XrEventDataBuffer.create(-1L); - - /** - * Creates a new {@code XrEventDataBuffer.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrEventDataBuffer#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrEventDataBuffer getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrEventDataBuffer.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrEventDataBuffer.nnext(address()); } - /** @return a {@link ByteBuffer} view of the {@code varying} field. */ - @NativeType("uint8_t[4000]") - public ByteBuffer varying() { return XrEventDataBuffer.nvarying(address()); } - /** @return the value at the specified index of the {@code varying} field. */ - @NativeType("uint8_t") - public byte varying(int index) { return XrEventDataBuffer.nvarying(address(), index); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrEventDataBuffer.ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_EVENT_DATA_BUFFER TYPE_EVENT_DATA_BUFFER} value to the {@code type} field. */ - public Buffer type$Default() { return type(XR10.XR_TYPE_EVENT_DATA_BUFFER); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrEventDataBuffer.nnext(address(), value); return this; } - /** Copies the specified {@link ByteBuffer} to the {@code varying} field. */ - public Buffer varying(@NativeType("uint8_t[4000]") ByteBuffer value) { XrEventDataBuffer.nvarying(address(), value); return this; } - /** Sets the specified value at the specified index of the {@code varying} field. */ - public Buffer varying(int index, @NativeType("uint8_t") byte value) { XrEventDataBuffer.nvarying(address(), index, value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrEventDataDisplayRefreshRateChangedFB.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrEventDataDisplayRefreshRateChangedFB.java deleted file mode 100644 index e38b433f..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrEventDataDisplayRefreshRateChangedFB.java +++ /dev/null @@ -1,315 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrEventDataDisplayRefreshRateChangedFB {
- *     XrStructureType type;
- *     void const * next;
- *     float fromDisplayRefreshRate;
- *     float toDisplayRefreshRate;
- * }
- */ -public class XrEventDataDisplayRefreshRateChangedFB extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - FROMDISPLAYREFRESHRATE, - TODISPLAYREFRESHRATE; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - FROMDISPLAYREFRESHRATE = layout.offsetof(2); - TODISPLAYREFRESHRATE = layout.offsetof(3); - } - - /** - * Creates a {@code XrEventDataDisplayRefreshRateChangedFB} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrEventDataDisplayRefreshRateChangedFB(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code fromDisplayRefreshRate} field. */ - public float fromDisplayRefreshRate() { return nfromDisplayRefreshRate(address()); } - /** @return the value of the {@code toDisplayRefreshRate} field. */ - public float toDisplayRefreshRate() { return ntoDisplayRefreshRate(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrEventDataDisplayRefreshRateChangedFB type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link FBDisplayRefreshRate#XR_TYPE_EVENT_DATA_DISPLAY_REFRESH_RATE_CHANGED_FB TYPE_EVENT_DATA_DISPLAY_REFRESH_RATE_CHANGED_FB} value to the {@code type} field. */ - public XrEventDataDisplayRefreshRateChangedFB type$Default() { return type(FBDisplayRefreshRate.XR_TYPE_EVENT_DATA_DISPLAY_REFRESH_RATE_CHANGED_FB); } - /** Sets the specified value to the {@code next} field. */ - public XrEventDataDisplayRefreshRateChangedFB next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code fromDisplayRefreshRate} field. */ - public XrEventDataDisplayRefreshRateChangedFB fromDisplayRefreshRate(float value) { nfromDisplayRefreshRate(address(), value); return this; } - /** Sets the specified value to the {@code toDisplayRefreshRate} field. */ - public XrEventDataDisplayRefreshRateChangedFB toDisplayRefreshRate(float value) { ntoDisplayRefreshRate(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrEventDataDisplayRefreshRateChangedFB set( - int type, - long next, - float fromDisplayRefreshRate, - float toDisplayRefreshRate - ) { - type(type); - next(next); - fromDisplayRefreshRate(fromDisplayRefreshRate); - toDisplayRefreshRate(toDisplayRefreshRate); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrEventDataDisplayRefreshRateChangedFB set(XrEventDataDisplayRefreshRateChangedFB src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrEventDataDisplayRefreshRateChangedFB} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrEventDataDisplayRefreshRateChangedFB malloc() { - return wrap(XrEventDataDisplayRefreshRateChangedFB.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrEventDataDisplayRefreshRateChangedFB} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrEventDataDisplayRefreshRateChangedFB calloc() { - return wrap(XrEventDataDisplayRefreshRateChangedFB.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrEventDataDisplayRefreshRateChangedFB} instance allocated with {@link BufferUtils}. */ - public static XrEventDataDisplayRefreshRateChangedFB create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrEventDataDisplayRefreshRateChangedFB.class, memAddress(container), container); - } - - /** Returns a new {@code XrEventDataDisplayRefreshRateChangedFB} instance for the specified memory address. */ - public static XrEventDataDisplayRefreshRateChangedFB create(long address) { - return wrap(XrEventDataDisplayRefreshRateChangedFB.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrEventDataDisplayRefreshRateChangedFB createSafe(long address) { - return address == NULL ? null : wrap(XrEventDataDisplayRefreshRateChangedFB.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrEventDataDisplayRefreshRateChangedFB.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrEventDataDisplayRefreshRateChangedFB} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrEventDataDisplayRefreshRateChangedFB malloc(MemoryStack stack) { - return wrap(XrEventDataDisplayRefreshRateChangedFB.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrEventDataDisplayRefreshRateChangedFB} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrEventDataDisplayRefreshRateChangedFB calloc(MemoryStack stack) { - return wrap(XrEventDataDisplayRefreshRateChangedFB.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrEventDataDisplayRefreshRateChangedFB.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrEventDataDisplayRefreshRateChangedFB.NEXT); } - /** Unsafe version of {@link #fromDisplayRefreshRate}. */ - public static float nfromDisplayRefreshRate(long struct) { return UNSAFE.getFloat(null, struct + XrEventDataDisplayRefreshRateChangedFB.FROMDISPLAYREFRESHRATE); } - /** Unsafe version of {@link #toDisplayRefreshRate}. */ - public static float ntoDisplayRefreshRate(long struct) { return UNSAFE.getFloat(null, struct + XrEventDataDisplayRefreshRateChangedFB.TODISPLAYREFRESHRATE); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrEventDataDisplayRefreshRateChangedFB.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrEventDataDisplayRefreshRateChangedFB.NEXT, value); } - /** Unsafe version of {@link #fromDisplayRefreshRate(float) fromDisplayRefreshRate}. */ - public static void nfromDisplayRefreshRate(long struct, float value) { UNSAFE.putFloat(null, struct + XrEventDataDisplayRefreshRateChangedFB.FROMDISPLAYREFRESHRATE, value); } - /** Unsafe version of {@link #toDisplayRefreshRate(float) toDisplayRefreshRate}. */ - public static void ntoDisplayRefreshRate(long struct, float value) { UNSAFE.putFloat(null, struct + XrEventDataDisplayRefreshRateChangedFB.TODISPLAYREFRESHRATE, value); } - - // ----------------------------------- - - /** An array of {@link XrEventDataDisplayRefreshRateChangedFB} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrEventDataDisplayRefreshRateChangedFB ELEMENT_FACTORY = XrEventDataDisplayRefreshRateChangedFB.create(-1L); - - /** - * Creates a new {@code XrEventDataDisplayRefreshRateChangedFB.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrEventDataDisplayRefreshRateChangedFB#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrEventDataDisplayRefreshRateChangedFB getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrEventDataDisplayRefreshRateChangedFB.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrEventDataDisplayRefreshRateChangedFB.nnext(address()); } - /** @return the value of the {@code fromDisplayRefreshRate} field. */ - public float fromDisplayRefreshRate() { return XrEventDataDisplayRefreshRateChangedFB.nfromDisplayRefreshRate(address()); } - /** @return the value of the {@code toDisplayRefreshRate} field. */ - public float toDisplayRefreshRate() { return XrEventDataDisplayRefreshRateChangedFB.ntoDisplayRefreshRate(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrEventDataDisplayRefreshRateChangedFB.ntype(address(), value); return this; } - /** Sets the {@link FBDisplayRefreshRate#XR_TYPE_EVENT_DATA_DISPLAY_REFRESH_RATE_CHANGED_FB TYPE_EVENT_DATA_DISPLAY_REFRESH_RATE_CHANGED_FB} value to the {@code type} field. */ - public Buffer type$Default() { return type(FBDisplayRefreshRate.XR_TYPE_EVENT_DATA_DISPLAY_REFRESH_RATE_CHANGED_FB); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrEventDataDisplayRefreshRateChangedFB.nnext(address(), value); return this; } - /** Sets the specified value to the {@code fromDisplayRefreshRate} field. */ - public Buffer fromDisplayRefreshRate(float value) { XrEventDataDisplayRefreshRateChangedFB.nfromDisplayRefreshRate(address(), value); return this; } - /** Sets the specified value to the {@code toDisplayRefreshRate} field. */ - public Buffer toDisplayRefreshRate(float value) { XrEventDataDisplayRefreshRateChangedFB.ntoDisplayRefreshRate(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrEventDataEventsLost.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrEventDataEventsLost.java deleted file mode 100644 index e3cc0b6f..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrEventDataEventsLost.java +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrEventDataEventsLost {
- *     XrStructureType type;
- *     void const * next;
- *     uint32_t lostEventCount;
- * }
- */ -public class XrEventDataEventsLost extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - LOSTEVENTCOUNT; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - LOSTEVENTCOUNT = layout.offsetof(2); - } - - /** - * Creates a {@code XrEventDataEventsLost} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrEventDataEventsLost(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code lostEventCount} field. */ - @NativeType("uint32_t") - public int lostEventCount() { return nlostEventCount(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrEventDataEventsLost type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_EVENT_DATA_EVENTS_LOST TYPE_EVENT_DATA_EVENTS_LOST} value to the {@code type} field. */ - public XrEventDataEventsLost type$Default() { return type(XR10.XR_TYPE_EVENT_DATA_EVENTS_LOST); } - /** Sets the specified value to the {@code next} field. */ - public XrEventDataEventsLost next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code lostEventCount} field. */ - public XrEventDataEventsLost lostEventCount(@NativeType("uint32_t") int value) { nlostEventCount(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrEventDataEventsLost set( - int type, - long next, - int lostEventCount - ) { - type(type); - next(next); - lostEventCount(lostEventCount); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrEventDataEventsLost set(XrEventDataEventsLost src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrEventDataEventsLost} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrEventDataEventsLost malloc() { - return wrap(XrEventDataEventsLost.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrEventDataEventsLost} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrEventDataEventsLost calloc() { - return wrap(XrEventDataEventsLost.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrEventDataEventsLost} instance allocated with {@link BufferUtils}. */ - public static XrEventDataEventsLost create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrEventDataEventsLost.class, memAddress(container), container); - } - - /** Returns a new {@code XrEventDataEventsLost} instance for the specified memory address. */ - public static XrEventDataEventsLost create(long address) { - return wrap(XrEventDataEventsLost.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrEventDataEventsLost createSafe(long address) { - return address == NULL ? null : wrap(XrEventDataEventsLost.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrEventDataEventsLost.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrEventDataEventsLost} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrEventDataEventsLost malloc(MemoryStack stack) { - return wrap(XrEventDataEventsLost.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrEventDataEventsLost} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrEventDataEventsLost calloc(MemoryStack stack) { - return wrap(XrEventDataEventsLost.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrEventDataEventsLost.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrEventDataEventsLost.NEXT); } - /** Unsafe version of {@link #lostEventCount}. */ - public static int nlostEventCount(long struct) { return UNSAFE.getInt(null, struct + XrEventDataEventsLost.LOSTEVENTCOUNT); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrEventDataEventsLost.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrEventDataEventsLost.NEXT, value); } - /** Unsafe version of {@link #lostEventCount(int) lostEventCount}. */ - public static void nlostEventCount(long struct, int value) { UNSAFE.putInt(null, struct + XrEventDataEventsLost.LOSTEVENTCOUNT, value); } - - // ----------------------------------- - - /** An array of {@link XrEventDataEventsLost} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrEventDataEventsLost ELEMENT_FACTORY = XrEventDataEventsLost.create(-1L); - - /** - * Creates a new {@code XrEventDataEventsLost.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrEventDataEventsLost#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrEventDataEventsLost getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrEventDataEventsLost.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrEventDataEventsLost.nnext(address()); } - /** @return the value of the {@code lostEventCount} field. */ - @NativeType("uint32_t") - public int lostEventCount() { return XrEventDataEventsLost.nlostEventCount(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrEventDataEventsLost.ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_EVENT_DATA_EVENTS_LOST TYPE_EVENT_DATA_EVENTS_LOST} value to the {@code type} field. */ - public Buffer type$Default() { return type(XR10.XR_TYPE_EVENT_DATA_EVENTS_LOST); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrEventDataEventsLost.nnext(address(), value); return this; } - /** Sets the specified value to the {@code lostEventCount} field. */ - public Buffer lostEventCount(@NativeType("uint32_t") int value) { XrEventDataEventsLost.nlostEventCount(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrEventDataInstanceLossPending.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrEventDataInstanceLossPending.java deleted file mode 100644 index e1f42865..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrEventDataInstanceLossPending.java +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrEventDataInstanceLossPending {
- *     XrStructureType type;
- *     void const * next;
- *     XrTime lossTime;
- * }
- */ -public class XrEventDataInstanceLossPending extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - LOSSTIME; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(8) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - LOSSTIME = layout.offsetof(2); - } - - /** - * Creates a {@code XrEventDataInstanceLossPending} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrEventDataInstanceLossPending(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code lossTime} field. */ - @NativeType("XrTime") - public long lossTime() { return nlossTime(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrEventDataInstanceLossPending type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_EVENT_DATA_INSTANCE_LOSS_PENDING TYPE_EVENT_DATA_INSTANCE_LOSS_PENDING} value to the {@code type} field. */ - public XrEventDataInstanceLossPending type$Default() { return type(XR10.XR_TYPE_EVENT_DATA_INSTANCE_LOSS_PENDING); } - /** Sets the specified value to the {@code next} field. */ - public XrEventDataInstanceLossPending next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code lossTime} field. */ - public XrEventDataInstanceLossPending lossTime(@NativeType("XrTime") long value) { nlossTime(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrEventDataInstanceLossPending set( - int type, - long next, - long lossTime - ) { - type(type); - next(next); - lossTime(lossTime); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrEventDataInstanceLossPending set(XrEventDataInstanceLossPending src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrEventDataInstanceLossPending} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrEventDataInstanceLossPending malloc() { - return wrap(XrEventDataInstanceLossPending.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrEventDataInstanceLossPending} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrEventDataInstanceLossPending calloc() { - return wrap(XrEventDataInstanceLossPending.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrEventDataInstanceLossPending} instance allocated with {@link BufferUtils}. */ - public static XrEventDataInstanceLossPending create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrEventDataInstanceLossPending.class, memAddress(container), container); - } - - /** Returns a new {@code XrEventDataInstanceLossPending} instance for the specified memory address. */ - public static XrEventDataInstanceLossPending create(long address) { - return wrap(XrEventDataInstanceLossPending.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrEventDataInstanceLossPending createSafe(long address) { - return address == NULL ? null : wrap(XrEventDataInstanceLossPending.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrEventDataInstanceLossPending.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrEventDataInstanceLossPending} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrEventDataInstanceLossPending malloc(MemoryStack stack) { - return wrap(XrEventDataInstanceLossPending.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrEventDataInstanceLossPending} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrEventDataInstanceLossPending calloc(MemoryStack stack) { - return wrap(XrEventDataInstanceLossPending.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrEventDataInstanceLossPending.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrEventDataInstanceLossPending.NEXT); } - /** Unsafe version of {@link #lossTime}. */ - public static long nlossTime(long struct) { return UNSAFE.getLong(null, struct + XrEventDataInstanceLossPending.LOSSTIME); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrEventDataInstanceLossPending.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrEventDataInstanceLossPending.NEXT, value); } - /** Unsafe version of {@link #lossTime(long) lossTime}. */ - public static void nlossTime(long struct, long value) { UNSAFE.putLong(null, struct + XrEventDataInstanceLossPending.LOSSTIME, value); } - - // ----------------------------------- - - /** An array of {@link XrEventDataInstanceLossPending} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrEventDataInstanceLossPending ELEMENT_FACTORY = XrEventDataInstanceLossPending.create(-1L); - - /** - * Creates a new {@code XrEventDataInstanceLossPending.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrEventDataInstanceLossPending#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrEventDataInstanceLossPending getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrEventDataInstanceLossPending.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrEventDataInstanceLossPending.nnext(address()); } - /** @return the value of the {@code lossTime} field. */ - @NativeType("XrTime") - public long lossTime() { return XrEventDataInstanceLossPending.nlossTime(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrEventDataInstanceLossPending.ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_EVENT_DATA_INSTANCE_LOSS_PENDING TYPE_EVENT_DATA_INSTANCE_LOSS_PENDING} value to the {@code type} field. */ - public Buffer type$Default() { return type(XR10.XR_TYPE_EVENT_DATA_INSTANCE_LOSS_PENDING); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrEventDataInstanceLossPending.nnext(address(), value); return this; } - /** Sets the specified value to the {@code lossTime} field. */ - public Buffer lossTime(@NativeType("XrTime") long value) { XrEventDataInstanceLossPending.nlossTime(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrEventDataInteractionProfileChanged.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrEventDataInteractionProfileChanged.java deleted file mode 100644 index 239cb86a..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrEventDataInteractionProfileChanged.java +++ /dev/null @@ -1,321 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrEventDataInteractionProfileChanged {
- *     XrStructureType type;
- *     void const * next;
- *     XrSession session;
- * }
- */ -public class XrEventDataInteractionProfileChanged extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - SESSION; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - SESSION = layout.offsetof(2); - } - - /** - * Creates a {@code XrEventDataInteractionProfileChanged} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrEventDataInteractionProfileChanged(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code session} field. */ - @NativeType("XrSession") - public long session() { return nsession(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrEventDataInteractionProfileChanged type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_EVENT_DATA_INTERACTION_PROFILE_CHANGED TYPE_EVENT_DATA_INTERACTION_PROFILE_CHANGED} value to the {@code type} field. */ - public XrEventDataInteractionProfileChanged type$Default() { return type(XR10.XR_TYPE_EVENT_DATA_INTERACTION_PROFILE_CHANGED); } - /** Sets the specified value to the {@code next} field. */ - public XrEventDataInteractionProfileChanged next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code session} field. */ - public XrEventDataInteractionProfileChanged session(XrSession value) { nsession(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrEventDataInteractionProfileChanged set( - int type, - long next, - XrSession session - ) { - type(type); - next(next); - session(session); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrEventDataInteractionProfileChanged set(XrEventDataInteractionProfileChanged src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrEventDataInteractionProfileChanged} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrEventDataInteractionProfileChanged malloc() { - return wrap(XrEventDataInteractionProfileChanged.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrEventDataInteractionProfileChanged} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrEventDataInteractionProfileChanged calloc() { - return wrap(XrEventDataInteractionProfileChanged.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrEventDataInteractionProfileChanged} instance allocated with {@link BufferUtils}. */ - public static XrEventDataInteractionProfileChanged create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrEventDataInteractionProfileChanged.class, memAddress(container), container); - } - - /** Returns a new {@code XrEventDataInteractionProfileChanged} instance for the specified memory address. */ - public static XrEventDataInteractionProfileChanged create(long address) { - return wrap(XrEventDataInteractionProfileChanged.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrEventDataInteractionProfileChanged createSafe(long address) { - return address == NULL ? null : wrap(XrEventDataInteractionProfileChanged.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrEventDataInteractionProfileChanged.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrEventDataInteractionProfileChanged} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrEventDataInteractionProfileChanged malloc(MemoryStack stack) { - return wrap(XrEventDataInteractionProfileChanged.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrEventDataInteractionProfileChanged} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrEventDataInteractionProfileChanged calloc(MemoryStack stack) { - return wrap(XrEventDataInteractionProfileChanged.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrEventDataInteractionProfileChanged.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrEventDataInteractionProfileChanged.NEXT); } - /** Unsafe version of {@link #session}. */ - public static long nsession(long struct) { return memGetAddress(struct + XrEventDataInteractionProfileChanged.SESSION); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrEventDataInteractionProfileChanged.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrEventDataInteractionProfileChanged.NEXT, value); } - /** Unsafe version of {@link #session(XrSession) session}. */ - public static void nsession(long struct, XrSession value) { memPutAddress(struct + XrEventDataInteractionProfileChanged.SESSION, value.address()); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XrEventDataInteractionProfileChanged.SESSION)); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrEventDataInteractionProfileChanged} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrEventDataInteractionProfileChanged ELEMENT_FACTORY = XrEventDataInteractionProfileChanged.create(-1L); - - /** - * Creates a new {@code XrEventDataInteractionProfileChanged.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrEventDataInteractionProfileChanged#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrEventDataInteractionProfileChanged getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrEventDataInteractionProfileChanged.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrEventDataInteractionProfileChanged.nnext(address()); } - /** @return the value of the {@code session} field. */ - @NativeType("XrSession") - public long session() { return XrEventDataInteractionProfileChanged.nsession(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrEventDataInteractionProfileChanged.ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_EVENT_DATA_INTERACTION_PROFILE_CHANGED TYPE_EVENT_DATA_INTERACTION_PROFILE_CHANGED} value to the {@code type} field. */ - public Buffer type$Default() { return type(XR10.XR_TYPE_EVENT_DATA_INTERACTION_PROFILE_CHANGED); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrEventDataInteractionProfileChanged.nnext(address(), value); return this; } - /** Sets the specified value to the {@code session} field. */ - public Buffer session(XrSession value) { XrEventDataInteractionProfileChanged.nsession(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrEventDataMainSessionVisibilityChangedEXTX.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrEventDataMainSessionVisibilityChangedEXTX.java deleted file mode 100644 index 11134e9c..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrEventDataMainSessionVisibilityChangedEXTX.java +++ /dev/null @@ -1,319 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrEventDataMainSessionVisibilityChangedEXTX {
- *     XrStructureType type;
- *     void const * next;
- *     XrBool32 visible;
- *     XrOverlayMainSessionFlagsEXTX flags;
- * }
- */ -public class XrEventDataMainSessionVisibilityChangedEXTX extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - VISIBLE, - FLAGS; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(8) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - VISIBLE = layout.offsetof(2); - FLAGS = layout.offsetof(3); - } - - /** - * Creates a {@code XrEventDataMainSessionVisibilityChangedEXTX} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrEventDataMainSessionVisibilityChangedEXTX(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code visible} field. */ - @NativeType("XrBool32") - public boolean visible() { return nvisible(address()) != 0; } - /** @return the value of the {@code flags} field. */ - @NativeType("XrOverlayMainSessionFlagsEXTX") - public long flags() { return nflags(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrEventDataMainSessionVisibilityChangedEXTX type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link EXTXOverlay#XR_TYPE_EVENT_DATA_MAIN_SESSION_VISIBILITY_CHANGED_EXTX TYPE_EVENT_DATA_MAIN_SESSION_VISIBILITY_CHANGED_EXTX} value to the {@code type} field. */ - public XrEventDataMainSessionVisibilityChangedEXTX type$Default() { return type(EXTXOverlay.XR_TYPE_EVENT_DATA_MAIN_SESSION_VISIBILITY_CHANGED_EXTX); } - /** Sets the specified value to the {@code next} field. */ - public XrEventDataMainSessionVisibilityChangedEXTX next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code visible} field. */ - public XrEventDataMainSessionVisibilityChangedEXTX visible(@NativeType("XrBool32") boolean value) { nvisible(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@code flags} field. */ - public XrEventDataMainSessionVisibilityChangedEXTX flags(@NativeType("XrOverlayMainSessionFlagsEXTX") long value) { nflags(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrEventDataMainSessionVisibilityChangedEXTX set( - int type, - long next, - boolean visible, - long flags - ) { - type(type); - next(next); - visible(visible); - flags(flags); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrEventDataMainSessionVisibilityChangedEXTX set(XrEventDataMainSessionVisibilityChangedEXTX src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrEventDataMainSessionVisibilityChangedEXTX} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrEventDataMainSessionVisibilityChangedEXTX malloc() { - return wrap(XrEventDataMainSessionVisibilityChangedEXTX.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrEventDataMainSessionVisibilityChangedEXTX} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrEventDataMainSessionVisibilityChangedEXTX calloc() { - return wrap(XrEventDataMainSessionVisibilityChangedEXTX.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrEventDataMainSessionVisibilityChangedEXTX} instance allocated with {@link BufferUtils}. */ - public static XrEventDataMainSessionVisibilityChangedEXTX create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrEventDataMainSessionVisibilityChangedEXTX.class, memAddress(container), container); - } - - /** Returns a new {@code XrEventDataMainSessionVisibilityChangedEXTX} instance for the specified memory address. */ - public static XrEventDataMainSessionVisibilityChangedEXTX create(long address) { - return wrap(XrEventDataMainSessionVisibilityChangedEXTX.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrEventDataMainSessionVisibilityChangedEXTX createSafe(long address) { - return address == NULL ? null : wrap(XrEventDataMainSessionVisibilityChangedEXTX.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrEventDataMainSessionVisibilityChangedEXTX.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrEventDataMainSessionVisibilityChangedEXTX} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrEventDataMainSessionVisibilityChangedEXTX malloc(MemoryStack stack) { - return wrap(XrEventDataMainSessionVisibilityChangedEXTX.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrEventDataMainSessionVisibilityChangedEXTX} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrEventDataMainSessionVisibilityChangedEXTX calloc(MemoryStack stack) { - return wrap(XrEventDataMainSessionVisibilityChangedEXTX.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrEventDataMainSessionVisibilityChangedEXTX.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrEventDataMainSessionVisibilityChangedEXTX.NEXT); } - /** Unsafe version of {@link #visible}. */ - public static int nvisible(long struct) { return UNSAFE.getInt(null, struct + XrEventDataMainSessionVisibilityChangedEXTX.VISIBLE); } - /** Unsafe version of {@link #flags}. */ - public static long nflags(long struct) { return UNSAFE.getLong(null, struct + XrEventDataMainSessionVisibilityChangedEXTX.FLAGS); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrEventDataMainSessionVisibilityChangedEXTX.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrEventDataMainSessionVisibilityChangedEXTX.NEXT, value); } - /** Unsafe version of {@link #visible(boolean) visible}. */ - public static void nvisible(long struct, int value) { UNSAFE.putInt(null, struct + XrEventDataMainSessionVisibilityChangedEXTX.VISIBLE, value); } - /** Unsafe version of {@link #flags(long) flags}. */ - public static void nflags(long struct, long value) { UNSAFE.putLong(null, struct + XrEventDataMainSessionVisibilityChangedEXTX.FLAGS, value); } - - // ----------------------------------- - - /** An array of {@link XrEventDataMainSessionVisibilityChangedEXTX} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrEventDataMainSessionVisibilityChangedEXTX ELEMENT_FACTORY = XrEventDataMainSessionVisibilityChangedEXTX.create(-1L); - - /** - * Creates a new {@code XrEventDataMainSessionVisibilityChangedEXTX.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrEventDataMainSessionVisibilityChangedEXTX#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrEventDataMainSessionVisibilityChangedEXTX getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrEventDataMainSessionVisibilityChangedEXTX.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrEventDataMainSessionVisibilityChangedEXTX.nnext(address()); } - /** @return the value of the {@code visible} field. */ - @NativeType("XrBool32") - public boolean visible() { return XrEventDataMainSessionVisibilityChangedEXTX.nvisible(address()) != 0; } - /** @return the value of the {@code flags} field. */ - @NativeType("XrOverlayMainSessionFlagsEXTX") - public long flags() { return XrEventDataMainSessionVisibilityChangedEXTX.nflags(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrEventDataMainSessionVisibilityChangedEXTX.ntype(address(), value); return this; } - /** Sets the {@link EXTXOverlay#XR_TYPE_EVENT_DATA_MAIN_SESSION_VISIBILITY_CHANGED_EXTX TYPE_EVENT_DATA_MAIN_SESSION_VISIBILITY_CHANGED_EXTX} value to the {@code type} field. */ - public Buffer type$Default() { return type(EXTXOverlay.XR_TYPE_EVENT_DATA_MAIN_SESSION_VISIBILITY_CHANGED_EXTX); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrEventDataMainSessionVisibilityChangedEXTX.nnext(address(), value); return this; } - /** Sets the specified value to the {@code visible} field. */ - public Buffer visible(@NativeType("XrBool32") boolean value) { XrEventDataMainSessionVisibilityChangedEXTX.nvisible(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@code flags} field. */ - public Buffer flags(@NativeType("XrOverlayMainSessionFlagsEXTX") long value) { XrEventDataMainSessionVisibilityChangedEXTX.nflags(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrEventDataMarkerTrackingUpdateVARJO.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrEventDataMarkerTrackingUpdateVARJO.java deleted file mode 100644 index 92a4a8ec..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrEventDataMarkerTrackingUpdateVARJO.java +++ /dev/null @@ -1,359 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrEventDataMarkerTrackingUpdateVARJO {
- *     XrStructureType type;
- *     void const * next;
- *     uint64_t markerId;
- *     XrBool32 isActive;
- *     XrBool32 isPredicted;
- *     XrTime time;
- * }
- */ -public class XrEventDataMarkerTrackingUpdateVARJO extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - MARKERID, - ISACTIVE, - ISPREDICTED, - TIME; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(8), - __member(4), - __member(4), - __member(8) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - MARKERID = layout.offsetof(2); - ISACTIVE = layout.offsetof(3); - ISPREDICTED = layout.offsetof(4); - TIME = layout.offsetof(5); - } - - /** - * Creates a {@code XrEventDataMarkerTrackingUpdateVARJO} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrEventDataMarkerTrackingUpdateVARJO(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code markerId} field. */ - @NativeType("uint64_t") - public long markerId() { return nmarkerId(address()); } - /** @return the value of the {@code isActive} field. */ - @NativeType("XrBool32") - public boolean isActive() { return nisActive(address()) != 0; } - /** @return the value of the {@code isPredicted} field. */ - @NativeType("XrBool32") - public boolean isPredicted() { return nisPredicted(address()) != 0; } - /** @return the value of the {@code time} field. */ - @NativeType("XrTime") - public long time() { return ntime(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrEventDataMarkerTrackingUpdateVARJO type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link VARJOMarkerTracking#XR_TYPE_EVENT_DATA_MARKER_TRACKING_UPDATE_VARJO TYPE_EVENT_DATA_MARKER_TRACKING_UPDATE_VARJO} value to the {@code type} field. */ - public XrEventDataMarkerTrackingUpdateVARJO type$Default() { return type(VARJOMarkerTracking.XR_TYPE_EVENT_DATA_MARKER_TRACKING_UPDATE_VARJO); } - /** Sets the specified value to the {@code next} field. */ - public XrEventDataMarkerTrackingUpdateVARJO next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code markerId} field. */ - public XrEventDataMarkerTrackingUpdateVARJO markerId(@NativeType("uint64_t") long value) { nmarkerId(address(), value); return this; } - /** Sets the specified value to the {@code isActive} field. */ - public XrEventDataMarkerTrackingUpdateVARJO isActive(@NativeType("XrBool32") boolean value) { nisActive(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@code isPredicted} field. */ - public XrEventDataMarkerTrackingUpdateVARJO isPredicted(@NativeType("XrBool32") boolean value) { nisPredicted(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@code time} field. */ - public XrEventDataMarkerTrackingUpdateVARJO time(@NativeType("XrTime") long value) { ntime(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrEventDataMarkerTrackingUpdateVARJO set( - int type, - long next, - long markerId, - boolean isActive, - boolean isPredicted, - long time - ) { - type(type); - next(next); - markerId(markerId); - isActive(isActive); - isPredicted(isPredicted); - time(time); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrEventDataMarkerTrackingUpdateVARJO set(XrEventDataMarkerTrackingUpdateVARJO src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrEventDataMarkerTrackingUpdateVARJO} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrEventDataMarkerTrackingUpdateVARJO malloc() { - return wrap(XrEventDataMarkerTrackingUpdateVARJO.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrEventDataMarkerTrackingUpdateVARJO} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrEventDataMarkerTrackingUpdateVARJO calloc() { - return wrap(XrEventDataMarkerTrackingUpdateVARJO.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrEventDataMarkerTrackingUpdateVARJO} instance allocated with {@link BufferUtils}. */ - public static XrEventDataMarkerTrackingUpdateVARJO create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrEventDataMarkerTrackingUpdateVARJO.class, memAddress(container), container); - } - - /** Returns a new {@code XrEventDataMarkerTrackingUpdateVARJO} instance for the specified memory address. */ - public static XrEventDataMarkerTrackingUpdateVARJO create(long address) { - return wrap(XrEventDataMarkerTrackingUpdateVARJO.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrEventDataMarkerTrackingUpdateVARJO createSafe(long address) { - return address == NULL ? null : wrap(XrEventDataMarkerTrackingUpdateVARJO.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrEventDataMarkerTrackingUpdateVARJO.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrEventDataMarkerTrackingUpdateVARJO} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrEventDataMarkerTrackingUpdateVARJO malloc(MemoryStack stack) { - return wrap(XrEventDataMarkerTrackingUpdateVARJO.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrEventDataMarkerTrackingUpdateVARJO} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrEventDataMarkerTrackingUpdateVARJO calloc(MemoryStack stack) { - return wrap(XrEventDataMarkerTrackingUpdateVARJO.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrEventDataMarkerTrackingUpdateVARJO.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrEventDataMarkerTrackingUpdateVARJO.NEXT); } - /** Unsafe version of {@link #markerId}. */ - public static long nmarkerId(long struct) { return UNSAFE.getLong(null, struct + XrEventDataMarkerTrackingUpdateVARJO.MARKERID); } - /** Unsafe version of {@link #isActive}. */ - public static int nisActive(long struct) { return UNSAFE.getInt(null, struct + XrEventDataMarkerTrackingUpdateVARJO.ISACTIVE); } - /** Unsafe version of {@link #isPredicted}. */ - public static int nisPredicted(long struct) { return UNSAFE.getInt(null, struct + XrEventDataMarkerTrackingUpdateVARJO.ISPREDICTED); } - /** Unsafe version of {@link #time}. */ - public static long ntime(long struct) { return UNSAFE.getLong(null, struct + XrEventDataMarkerTrackingUpdateVARJO.TIME); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrEventDataMarkerTrackingUpdateVARJO.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrEventDataMarkerTrackingUpdateVARJO.NEXT, value); } - /** Unsafe version of {@link #markerId(long) markerId}. */ - public static void nmarkerId(long struct, long value) { UNSAFE.putLong(null, struct + XrEventDataMarkerTrackingUpdateVARJO.MARKERID, value); } - /** Unsafe version of {@link #isActive(boolean) isActive}. */ - public static void nisActive(long struct, int value) { UNSAFE.putInt(null, struct + XrEventDataMarkerTrackingUpdateVARJO.ISACTIVE, value); } - /** Unsafe version of {@link #isPredicted(boolean) isPredicted}. */ - public static void nisPredicted(long struct, int value) { UNSAFE.putInt(null, struct + XrEventDataMarkerTrackingUpdateVARJO.ISPREDICTED, value); } - /** Unsafe version of {@link #time(long) time}. */ - public static void ntime(long struct, long value) { UNSAFE.putLong(null, struct + XrEventDataMarkerTrackingUpdateVARJO.TIME, value); } - - // ----------------------------------- - - /** An array of {@link XrEventDataMarkerTrackingUpdateVARJO} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrEventDataMarkerTrackingUpdateVARJO ELEMENT_FACTORY = XrEventDataMarkerTrackingUpdateVARJO.create(-1L); - - /** - * Creates a new {@code XrEventDataMarkerTrackingUpdateVARJO.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrEventDataMarkerTrackingUpdateVARJO#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrEventDataMarkerTrackingUpdateVARJO getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrEventDataMarkerTrackingUpdateVARJO.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrEventDataMarkerTrackingUpdateVARJO.nnext(address()); } - /** @return the value of the {@code markerId} field. */ - @NativeType("uint64_t") - public long markerId() { return XrEventDataMarkerTrackingUpdateVARJO.nmarkerId(address()); } - /** @return the value of the {@code isActive} field. */ - @NativeType("XrBool32") - public boolean isActive() { return XrEventDataMarkerTrackingUpdateVARJO.nisActive(address()) != 0; } - /** @return the value of the {@code isPredicted} field. */ - @NativeType("XrBool32") - public boolean isPredicted() { return XrEventDataMarkerTrackingUpdateVARJO.nisPredicted(address()) != 0; } - /** @return the value of the {@code time} field. */ - @NativeType("XrTime") - public long time() { return XrEventDataMarkerTrackingUpdateVARJO.ntime(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrEventDataMarkerTrackingUpdateVARJO.ntype(address(), value); return this; } - /** Sets the {@link VARJOMarkerTracking#XR_TYPE_EVENT_DATA_MARKER_TRACKING_UPDATE_VARJO TYPE_EVENT_DATA_MARKER_TRACKING_UPDATE_VARJO} value to the {@code type} field. */ - public Buffer type$Default() { return type(VARJOMarkerTracking.XR_TYPE_EVENT_DATA_MARKER_TRACKING_UPDATE_VARJO); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrEventDataMarkerTrackingUpdateVARJO.nnext(address(), value); return this; } - /** Sets the specified value to the {@code markerId} field. */ - public Buffer markerId(@NativeType("uint64_t") long value) { XrEventDataMarkerTrackingUpdateVARJO.nmarkerId(address(), value); return this; } - /** Sets the specified value to the {@code isActive} field. */ - public Buffer isActive(@NativeType("XrBool32") boolean value) { XrEventDataMarkerTrackingUpdateVARJO.nisActive(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@code isPredicted} field. */ - public Buffer isPredicted(@NativeType("XrBool32") boolean value) { XrEventDataMarkerTrackingUpdateVARJO.nisPredicted(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@code time} field. */ - public Buffer time(@NativeType("XrTime") long value) { XrEventDataMarkerTrackingUpdateVARJO.ntime(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrEventDataPassthroughStateChangedFB.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrEventDataPassthroughStateChangedFB.java deleted file mode 100644 index 14d2dec2..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrEventDataPassthroughStateChangedFB.java +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrEventDataPassthroughStateChangedFB {
- *     XrStructureType type;
- *     void const * next;
- *     XrPassthroughStateChangedFlagsFB flags;
- * }
- */ -public class XrEventDataPassthroughStateChangedFB extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - FLAGS; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(8) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - FLAGS = layout.offsetof(2); - } - - /** - * Creates a {@code XrEventDataPassthroughStateChangedFB} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrEventDataPassthroughStateChangedFB(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code flags} field. */ - @NativeType("XrPassthroughStateChangedFlagsFB") - public long flags() { return nflags(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrEventDataPassthroughStateChangedFB type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link FBPassthrough#XR_TYPE_EVENT_DATA_PASSTHROUGH_STATE_CHANGED_FB TYPE_EVENT_DATA_PASSTHROUGH_STATE_CHANGED_FB} value to the {@code type} field. */ - public XrEventDataPassthroughStateChangedFB type$Default() { return type(FBPassthrough.XR_TYPE_EVENT_DATA_PASSTHROUGH_STATE_CHANGED_FB); } - /** Sets the specified value to the {@code next} field. */ - public XrEventDataPassthroughStateChangedFB next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code flags} field. */ - public XrEventDataPassthroughStateChangedFB flags(@NativeType("XrPassthroughStateChangedFlagsFB") long value) { nflags(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrEventDataPassthroughStateChangedFB set( - int type, - long next, - long flags - ) { - type(type); - next(next); - flags(flags); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrEventDataPassthroughStateChangedFB set(XrEventDataPassthroughStateChangedFB src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrEventDataPassthroughStateChangedFB} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrEventDataPassthroughStateChangedFB malloc() { - return wrap(XrEventDataPassthroughStateChangedFB.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrEventDataPassthroughStateChangedFB} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrEventDataPassthroughStateChangedFB calloc() { - return wrap(XrEventDataPassthroughStateChangedFB.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrEventDataPassthroughStateChangedFB} instance allocated with {@link BufferUtils}. */ - public static XrEventDataPassthroughStateChangedFB create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrEventDataPassthroughStateChangedFB.class, memAddress(container), container); - } - - /** Returns a new {@code XrEventDataPassthroughStateChangedFB} instance for the specified memory address. */ - public static XrEventDataPassthroughStateChangedFB create(long address) { - return wrap(XrEventDataPassthroughStateChangedFB.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrEventDataPassthroughStateChangedFB createSafe(long address) { - return address == NULL ? null : wrap(XrEventDataPassthroughStateChangedFB.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrEventDataPassthroughStateChangedFB.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrEventDataPassthroughStateChangedFB} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrEventDataPassthroughStateChangedFB malloc(MemoryStack stack) { - return wrap(XrEventDataPassthroughStateChangedFB.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrEventDataPassthroughStateChangedFB} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrEventDataPassthroughStateChangedFB calloc(MemoryStack stack) { - return wrap(XrEventDataPassthroughStateChangedFB.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrEventDataPassthroughStateChangedFB.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrEventDataPassthroughStateChangedFB.NEXT); } - /** Unsafe version of {@link #flags}. */ - public static long nflags(long struct) { return UNSAFE.getLong(null, struct + XrEventDataPassthroughStateChangedFB.FLAGS); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrEventDataPassthroughStateChangedFB.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrEventDataPassthroughStateChangedFB.NEXT, value); } - /** Unsafe version of {@link #flags(long) flags}. */ - public static void nflags(long struct, long value) { UNSAFE.putLong(null, struct + XrEventDataPassthroughStateChangedFB.FLAGS, value); } - - // ----------------------------------- - - /** An array of {@link XrEventDataPassthroughStateChangedFB} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrEventDataPassthroughStateChangedFB ELEMENT_FACTORY = XrEventDataPassthroughStateChangedFB.create(-1L); - - /** - * Creates a new {@code XrEventDataPassthroughStateChangedFB.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrEventDataPassthroughStateChangedFB#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrEventDataPassthroughStateChangedFB getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrEventDataPassthroughStateChangedFB.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrEventDataPassthroughStateChangedFB.nnext(address()); } - /** @return the value of the {@code flags} field. */ - @NativeType("XrPassthroughStateChangedFlagsFB") - public long flags() { return XrEventDataPassthroughStateChangedFB.nflags(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrEventDataPassthroughStateChangedFB.ntype(address(), value); return this; } - /** Sets the {@link FBPassthrough#XR_TYPE_EVENT_DATA_PASSTHROUGH_STATE_CHANGED_FB TYPE_EVENT_DATA_PASSTHROUGH_STATE_CHANGED_FB} value to the {@code type} field. */ - public Buffer type$Default() { return type(FBPassthrough.XR_TYPE_EVENT_DATA_PASSTHROUGH_STATE_CHANGED_FB); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrEventDataPassthroughStateChangedFB.nnext(address(), value); return this; } - /** Sets the specified value to the {@code flags} field. */ - public Buffer flags(@NativeType("XrPassthroughStateChangedFlagsFB") long value) { XrEventDataPassthroughStateChangedFB.nflags(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrEventDataPerfSettingsEXT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrEventDataPerfSettingsEXT.java deleted file mode 100644 index 374be030..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrEventDataPerfSettingsEXT.java +++ /dev/null @@ -1,359 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrEventDataPerfSettingsEXT {
- *     XrStructureType type;
- *     void const * next;
- *     XrPerfSettingsDomainEXT domain;
- *     XrPerfSettingsSubDomainEXT subDomain;
- *     XrPerfSettingsNotificationLevelEXT fromLevel;
- *     XrPerfSettingsNotificationLevelEXT toLevel;
- * }
- */ -public class XrEventDataPerfSettingsEXT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - DOMAIN, - SUBDOMAIN, - FROMLEVEL, - TOLEVEL; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(4), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - DOMAIN = layout.offsetof(2); - SUBDOMAIN = layout.offsetof(3); - FROMLEVEL = layout.offsetof(4); - TOLEVEL = layout.offsetof(5); - } - - /** - * Creates a {@code XrEventDataPerfSettingsEXT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrEventDataPerfSettingsEXT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code domain} field. */ - @NativeType("XrPerfSettingsDomainEXT") - public int domain() { return ndomain(address()); } - /** @return the value of the {@code subDomain} field. */ - @NativeType("XrPerfSettingsSubDomainEXT") - public int subDomain() { return nsubDomain(address()); } - /** @return the value of the {@code fromLevel} field. */ - @NativeType("XrPerfSettingsNotificationLevelEXT") - public int fromLevel() { return nfromLevel(address()); } - /** @return the value of the {@code toLevel} field. */ - @NativeType("XrPerfSettingsNotificationLevelEXT") - public int toLevel() { return ntoLevel(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrEventDataPerfSettingsEXT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link EXTPerformanceSettings#XR_TYPE_EVENT_DATA_PERF_SETTINGS_EXT TYPE_EVENT_DATA_PERF_SETTINGS_EXT} value to the {@code type} field. */ - public XrEventDataPerfSettingsEXT type$Default() { return type(EXTPerformanceSettings.XR_TYPE_EVENT_DATA_PERF_SETTINGS_EXT); } - /** Sets the specified value to the {@code next} field. */ - public XrEventDataPerfSettingsEXT next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code domain} field. */ - public XrEventDataPerfSettingsEXT domain(@NativeType("XrPerfSettingsDomainEXT") int value) { ndomain(address(), value); return this; } - /** Sets the specified value to the {@code subDomain} field. */ - public XrEventDataPerfSettingsEXT subDomain(@NativeType("XrPerfSettingsSubDomainEXT") int value) { nsubDomain(address(), value); return this; } - /** Sets the specified value to the {@code fromLevel} field. */ - public XrEventDataPerfSettingsEXT fromLevel(@NativeType("XrPerfSettingsNotificationLevelEXT") int value) { nfromLevel(address(), value); return this; } - /** Sets the specified value to the {@code toLevel} field. */ - public XrEventDataPerfSettingsEXT toLevel(@NativeType("XrPerfSettingsNotificationLevelEXT") int value) { ntoLevel(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrEventDataPerfSettingsEXT set( - int type, - long next, - int domain, - int subDomain, - int fromLevel, - int toLevel - ) { - type(type); - next(next); - domain(domain); - subDomain(subDomain); - fromLevel(fromLevel); - toLevel(toLevel); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrEventDataPerfSettingsEXT set(XrEventDataPerfSettingsEXT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrEventDataPerfSettingsEXT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrEventDataPerfSettingsEXT malloc() { - return wrap(XrEventDataPerfSettingsEXT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrEventDataPerfSettingsEXT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrEventDataPerfSettingsEXT calloc() { - return wrap(XrEventDataPerfSettingsEXT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrEventDataPerfSettingsEXT} instance allocated with {@link BufferUtils}. */ - public static XrEventDataPerfSettingsEXT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrEventDataPerfSettingsEXT.class, memAddress(container), container); - } - - /** Returns a new {@code XrEventDataPerfSettingsEXT} instance for the specified memory address. */ - public static XrEventDataPerfSettingsEXT create(long address) { - return wrap(XrEventDataPerfSettingsEXT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrEventDataPerfSettingsEXT createSafe(long address) { - return address == NULL ? null : wrap(XrEventDataPerfSettingsEXT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrEventDataPerfSettingsEXT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrEventDataPerfSettingsEXT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrEventDataPerfSettingsEXT malloc(MemoryStack stack) { - return wrap(XrEventDataPerfSettingsEXT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrEventDataPerfSettingsEXT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrEventDataPerfSettingsEXT calloc(MemoryStack stack) { - return wrap(XrEventDataPerfSettingsEXT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrEventDataPerfSettingsEXT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrEventDataPerfSettingsEXT.NEXT); } - /** Unsafe version of {@link #domain}. */ - public static int ndomain(long struct) { return UNSAFE.getInt(null, struct + XrEventDataPerfSettingsEXT.DOMAIN); } - /** Unsafe version of {@link #subDomain}. */ - public static int nsubDomain(long struct) { return UNSAFE.getInt(null, struct + XrEventDataPerfSettingsEXT.SUBDOMAIN); } - /** Unsafe version of {@link #fromLevel}. */ - public static int nfromLevel(long struct) { return UNSAFE.getInt(null, struct + XrEventDataPerfSettingsEXT.FROMLEVEL); } - /** Unsafe version of {@link #toLevel}. */ - public static int ntoLevel(long struct) { return UNSAFE.getInt(null, struct + XrEventDataPerfSettingsEXT.TOLEVEL); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrEventDataPerfSettingsEXT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrEventDataPerfSettingsEXT.NEXT, value); } - /** Unsafe version of {@link #domain(int) domain}. */ - public static void ndomain(long struct, int value) { UNSAFE.putInt(null, struct + XrEventDataPerfSettingsEXT.DOMAIN, value); } - /** Unsafe version of {@link #subDomain(int) subDomain}. */ - public static void nsubDomain(long struct, int value) { UNSAFE.putInt(null, struct + XrEventDataPerfSettingsEXT.SUBDOMAIN, value); } - /** Unsafe version of {@link #fromLevel(int) fromLevel}. */ - public static void nfromLevel(long struct, int value) { UNSAFE.putInt(null, struct + XrEventDataPerfSettingsEXT.FROMLEVEL, value); } - /** Unsafe version of {@link #toLevel(int) toLevel}. */ - public static void ntoLevel(long struct, int value) { UNSAFE.putInt(null, struct + XrEventDataPerfSettingsEXT.TOLEVEL, value); } - - // ----------------------------------- - - /** An array of {@link XrEventDataPerfSettingsEXT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrEventDataPerfSettingsEXT ELEMENT_FACTORY = XrEventDataPerfSettingsEXT.create(-1L); - - /** - * Creates a new {@code XrEventDataPerfSettingsEXT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrEventDataPerfSettingsEXT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrEventDataPerfSettingsEXT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrEventDataPerfSettingsEXT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrEventDataPerfSettingsEXT.nnext(address()); } - /** @return the value of the {@code domain} field. */ - @NativeType("XrPerfSettingsDomainEXT") - public int domain() { return XrEventDataPerfSettingsEXT.ndomain(address()); } - /** @return the value of the {@code subDomain} field. */ - @NativeType("XrPerfSettingsSubDomainEXT") - public int subDomain() { return XrEventDataPerfSettingsEXT.nsubDomain(address()); } - /** @return the value of the {@code fromLevel} field. */ - @NativeType("XrPerfSettingsNotificationLevelEXT") - public int fromLevel() { return XrEventDataPerfSettingsEXT.nfromLevel(address()); } - /** @return the value of the {@code toLevel} field. */ - @NativeType("XrPerfSettingsNotificationLevelEXT") - public int toLevel() { return XrEventDataPerfSettingsEXT.ntoLevel(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrEventDataPerfSettingsEXT.ntype(address(), value); return this; } - /** Sets the {@link EXTPerformanceSettings#XR_TYPE_EVENT_DATA_PERF_SETTINGS_EXT TYPE_EVENT_DATA_PERF_SETTINGS_EXT} value to the {@code type} field. */ - public Buffer type$Default() { return type(EXTPerformanceSettings.XR_TYPE_EVENT_DATA_PERF_SETTINGS_EXT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrEventDataPerfSettingsEXT.nnext(address(), value); return this; } - /** Sets the specified value to the {@code domain} field. */ - public Buffer domain(@NativeType("XrPerfSettingsDomainEXT") int value) { XrEventDataPerfSettingsEXT.ndomain(address(), value); return this; } - /** Sets the specified value to the {@code subDomain} field. */ - public Buffer subDomain(@NativeType("XrPerfSettingsSubDomainEXT") int value) { XrEventDataPerfSettingsEXT.nsubDomain(address(), value); return this; } - /** Sets the specified value to the {@code fromLevel} field. */ - public Buffer fromLevel(@NativeType("XrPerfSettingsNotificationLevelEXT") int value) { XrEventDataPerfSettingsEXT.nfromLevel(address(), value); return this; } - /** Sets the specified value to the {@code toLevel} field. */ - public Buffer toLevel(@NativeType("XrPerfSettingsNotificationLevelEXT") int value) { XrEventDataPerfSettingsEXT.ntoLevel(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrEventDataReferenceSpaceChangePending.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrEventDataReferenceSpaceChangePending.java deleted file mode 100644 index c61830f6..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrEventDataReferenceSpaceChangePending.java +++ /dev/null @@ -1,403 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrEventDataReferenceSpaceChangePending {
- *     XrStructureType type;
- *     void const * next;
- *     XrSession session;
- *     XrReferenceSpaceType referenceSpaceType;
- *     XrTime changeTime;
- *     XrBool32 poseValid;
- *     {@link XrPosef XrPosef} poseInPreviousSpace;
- * }
- */ -public class XrEventDataReferenceSpaceChangePending extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - SESSION, - REFERENCESPACETYPE, - CHANGETIME, - POSEVALID, - POSEINPREVIOUSSPACE; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(4), - __member(8), - __member(4), - __member(XrPosef.SIZEOF, XrPosef.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - SESSION = layout.offsetof(2); - REFERENCESPACETYPE = layout.offsetof(3); - CHANGETIME = layout.offsetof(4); - POSEVALID = layout.offsetof(5); - POSEINPREVIOUSSPACE = layout.offsetof(6); - } - - /** - * Creates a {@code XrEventDataReferenceSpaceChangePending} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrEventDataReferenceSpaceChangePending(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code session} field. */ - @NativeType("XrSession") - public long session() { return nsession(address()); } - /** @return the value of the {@code referenceSpaceType} field. */ - @NativeType("XrReferenceSpaceType") - public int referenceSpaceType() { return nreferenceSpaceType(address()); } - /** @return the value of the {@code changeTime} field. */ - @NativeType("XrTime") - public long changeTime() { return nchangeTime(address()); } - /** @return the value of the {@code poseValid} field. */ - @NativeType("XrBool32") - public boolean poseValid() { return nposeValid(address()) != 0; } - /** @return a {@link XrPosef} view of the {@code poseInPreviousSpace} field. */ - public XrPosef poseInPreviousSpace() { return nposeInPreviousSpace(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrEventDataReferenceSpaceChangePending type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_EVENT_DATA_REFERENCE_SPACE_CHANGE_PENDING TYPE_EVENT_DATA_REFERENCE_SPACE_CHANGE_PENDING} value to the {@code type} field. */ - public XrEventDataReferenceSpaceChangePending type$Default() { return type(XR10.XR_TYPE_EVENT_DATA_REFERENCE_SPACE_CHANGE_PENDING); } - /** Sets the specified value to the {@code next} field. */ - public XrEventDataReferenceSpaceChangePending next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code session} field. */ - public XrEventDataReferenceSpaceChangePending session(XrSession value) { nsession(address(), value); return this; } - /** Sets the specified value to the {@code referenceSpaceType} field. */ - public XrEventDataReferenceSpaceChangePending referenceSpaceType(@NativeType("XrReferenceSpaceType") int value) { nreferenceSpaceType(address(), value); return this; } - /** Sets the specified value to the {@code changeTime} field. */ - public XrEventDataReferenceSpaceChangePending changeTime(@NativeType("XrTime") long value) { nchangeTime(address(), value); return this; } - /** Sets the specified value to the {@code poseValid} field. */ - public XrEventDataReferenceSpaceChangePending poseValid(@NativeType("XrBool32") boolean value) { nposeValid(address(), value ? 1 : 0); return this; } - /** Copies the specified {@link XrPosef} to the {@code poseInPreviousSpace} field. */ - public XrEventDataReferenceSpaceChangePending poseInPreviousSpace(XrPosef value) { nposeInPreviousSpace(address(), value); return this; } - /** Passes the {@code poseInPreviousSpace} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrEventDataReferenceSpaceChangePending poseInPreviousSpace(java.util.function.Consumer consumer) { consumer.accept(poseInPreviousSpace()); return this; } - - /** Initializes this struct with the specified values. */ - public XrEventDataReferenceSpaceChangePending set( - int type, - long next, - XrSession session, - int referenceSpaceType, - long changeTime, - boolean poseValid, - XrPosef poseInPreviousSpace - ) { - type(type); - next(next); - session(session); - referenceSpaceType(referenceSpaceType); - changeTime(changeTime); - poseValid(poseValid); - poseInPreviousSpace(poseInPreviousSpace); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrEventDataReferenceSpaceChangePending set(XrEventDataReferenceSpaceChangePending src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrEventDataReferenceSpaceChangePending} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrEventDataReferenceSpaceChangePending malloc() { - return wrap(XrEventDataReferenceSpaceChangePending.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrEventDataReferenceSpaceChangePending} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrEventDataReferenceSpaceChangePending calloc() { - return wrap(XrEventDataReferenceSpaceChangePending.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrEventDataReferenceSpaceChangePending} instance allocated with {@link BufferUtils}. */ - public static XrEventDataReferenceSpaceChangePending create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrEventDataReferenceSpaceChangePending.class, memAddress(container), container); - } - - /** Returns a new {@code XrEventDataReferenceSpaceChangePending} instance for the specified memory address. */ - public static XrEventDataReferenceSpaceChangePending create(long address) { - return wrap(XrEventDataReferenceSpaceChangePending.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrEventDataReferenceSpaceChangePending createSafe(long address) { - return address == NULL ? null : wrap(XrEventDataReferenceSpaceChangePending.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrEventDataReferenceSpaceChangePending.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrEventDataReferenceSpaceChangePending} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrEventDataReferenceSpaceChangePending malloc(MemoryStack stack) { - return wrap(XrEventDataReferenceSpaceChangePending.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrEventDataReferenceSpaceChangePending} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrEventDataReferenceSpaceChangePending calloc(MemoryStack stack) { - return wrap(XrEventDataReferenceSpaceChangePending.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrEventDataReferenceSpaceChangePending.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrEventDataReferenceSpaceChangePending.NEXT); } - /** Unsafe version of {@link #session}. */ - public static long nsession(long struct) { return memGetAddress(struct + XrEventDataReferenceSpaceChangePending.SESSION); } - /** Unsafe version of {@link #referenceSpaceType}. */ - public static int nreferenceSpaceType(long struct) { return UNSAFE.getInt(null, struct + XrEventDataReferenceSpaceChangePending.REFERENCESPACETYPE); } - /** Unsafe version of {@link #changeTime}. */ - public static long nchangeTime(long struct) { return UNSAFE.getLong(null, struct + XrEventDataReferenceSpaceChangePending.CHANGETIME); } - /** Unsafe version of {@link #poseValid}. */ - public static int nposeValid(long struct) { return UNSAFE.getInt(null, struct + XrEventDataReferenceSpaceChangePending.POSEVALID); } - /** Unsafe version of {@link #poseInPreviousSpace}. */ - public static XrPosef nposeInPreviousSpace(long struct) { return XrPosef.create(struct + XrEventDataReferenceSpaceChangePending.POSEINPREVIOUSSPACE); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrEventDataReferenceSpaceChangePending.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrEventDataReferenceSpaceChangePending.NEXT, value); } - /** Unsafe version of {@link #session(XrSession) session}. */ - public static void nsession(long struct, XrSession value) { memPutAddress(struct + XrEventDataReferenceSpaceChangePending.SESSION, value.address()); } - /** Unsafe version of {@link #referenceSpaceType(int) referenceSpaceType}. */ - public static void nreferenceSpaceType(long struct, int value) { UNSAFE.putInt(null, struct + XrEventDataReferenceSpaceChangePending.REFERENCESPACETYPE, value); } - /** Unsafe version of {@link #changeTime(long) changeTime}. */ - public static void nchangeTime(long struct, long value) { UNSAFE.putLong(null, struct + XrEventDataReferenceSpaceChangePending.CHANGETIME, value); } - /** Unsafe version of {@link #poseValid(boolean) poseValid}. */ - public static void nposeValid(long struct, int value) { UNSAFE.putInt(null, struct + XrEventDataReferenceSpaceChangePending.POSEVALID, value); } - /** Unsafe version of {@link #poseInPreviousSpace(XrPosef) poseInPreviousSpace}. */ - public static void nposeInPreviousSpace(long struct, XrPosef value) { memCopy(value.address(), struct + XrEventDataReferenceSpaceChangePending.POSEINPREVIOUSSPACE, XrPosef.SIZEOF); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XrEventDataReferenceSpaceChangePending.SESSION)); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrEventDataReferenceSpaceChangePending} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrEventDataReferenceSpaceChangePending ELEMENT_FACTORY = XrEventDataReferenceSpaceChangePending.create(-1L); - - /** - * Creates a new {@code XrEventDataReferenceSpaceChangePending.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrEventDataReferenceSpaceChangePending#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrEventDataReferenceSpaceChangePending getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrEventDataReferenceSpaceChangePending.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrEventDataReferenceSpaceChangePending.nnext(address()); } - /** @return the value of the {@code session} field. */ - @NativeType("XrSession") - public long session() { return XrEventDataReferenceSpaceChangePending.nsession(address()); } - /** @return the value of the {@code referenceSpaceType} field. */ - @NativeType("XrReferenceSpaceType") - public int referenceSpaceType() { return XrEventDataReferenceSpaceChangePending.nreferenceSpaceType(address()); } - /** @return the value of the {@code changeTime} field. */ - @NativeType("XrTime") - public long changeTime() { return XrEventDataReferenceSpaceChangePending.nchangeTime(address()); } - /** @return the value of the {@code poseValid} field. */ - @NativeType("XrBool32") - public boolean poseValid() { return XrEventDataReferenceSpaceChangePending.nposeValid(address()) != 0; } - /** @return a {@link XrPosef} view of the {@code poseInPreviousSpace} field. */ - public XrPosef poseInPreviousSpace() { return XrEventDataReferenceSpaceChangePending.nposeInPreviousSpace(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrEventDataReferenceSpaceChangePending.ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_EVENT_DATA_REFERENCE_SPACE_CHANGE_PENDING TYPE_EVENT_DATA_REFERENCE_SPACE_CHANGE_PENDING} value to the {@code type} field. */ - public Buffer type$Default() { return type(XR10.XR_TYPE_EVENT_DATA_REFERENCE_SPACE_CHANGE_PENDING); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrEventDataReferenceSpaceChangePending.nnext(address(), value); return this; } - /** Sets the specified value to the {@code session} field. */ - public Buffer session(XrSession value) { XrEventDataReferenceSpaceChangePending.nsession(address(), value); return this; } - /** Sets the specified value to the {@code referenceSpaceType} field. */ - public Buffer referenceSpaceType(@NativeType("XrReferenceSpaceType") int value) { XrEventDataReferenceSpaceChangePending.nreferenceSpaceType(address(), value); return this; } - /** Sets the specified value to the {@code changeTime} field. */ - public Buffer changeTime(@NativeType("XrTime") long value) { XrEventDataReferenceSpaceChangePending.nchangeTime(address(), value); return this; } - /** Sets the specified value to the {@code poseValid} field. */ - public Buffer poseValid(@NativeType("XrBool32") boolean value) { XrEventDataReferenceSpaceChangePending.nposeValid(address(), value ? 1 : 0); return this; } - /** Copies the specified {@link XrPosef} to the {@code poseInPreviousSpace} field. */ - public Buffer poseInPreviousSpace(XrPosef value) { XrEventDataReferenceSpaceChangePending.nposeInPreviousSpace(address(), value); return this; } - /** Passes the {@code poseInPreviousSpace} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer poseInPreviousSpace(java.util.function.Consumer consumer) { consumer.accept(poseInPreviousSpace()); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrEventDataSessionStateChanged.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrEventDataSessionStateChanged.java deleted file mode 100644 index 9323e414..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrEventDataSessionStateChanged.java +++ /dev/null @@ -1,361 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrEventDataSessionStateChanged {
- *     XrStructureType type;
- *     void const * next;
- *     XrSession session;
- *     XrSessionState state;
- *     XrTime time;
- * }
- */ -public class XrEventDataSessionStateChanged extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - SESSION, - STATE, - TIME; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(4), - __member(8) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - SESSION = layout.offsetof(2); - STATE = layout.offsetof(3); - TIME = layout.offsetof(4); - } - - /** - * Creates a {@code XrEventDataSessionStateChanged} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrEventDataSessionStateChanged(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code session} field. */ - @NativeType("XrSession") - public long session() { return nsession(address()); } - /** @return the value of the {@code state} field. */ - @NativeType("XrSessionState") - public int state() { return nstate(address()); } - /** @return the value of the {@code time} field. */ - @NativeType("XrTime") - public long time() { return ntime(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrEventDataSessionStateChanged type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_EVENT_DATA_SESSION_STATE_CHANGED TYPE_EVENT_DATA_SESSION_STATE_CHANGED} value to the {@code type} field. */ - public XrEventDataSessionStateChanged type$Default() { return type(XR10.XR_TYPE_EVENT_DATA_SESSION_STATE_CHANGED); } - /** Sets the specified value to the {@code next} field. */ - public XrEventDataSessionStateChanged next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code session} field. */ - public XrEventDataSessionStateChanged session(XrSession value) { nsession(address(), value); return this; } - /** Sets the specified value to the {@code state} field. */ - public XrEventDataSessionStateChanged state(@NativeType("XrSessionState") int value) { nstate(address(), value); return this; } - /** Sets the specified value to the {@code time} field. */ - public XrEventDataSessionStateChanged time(@NativeType("XrTime") long value) { ntime(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrEventDataSessionStateChanged set( - int type, - long next, - XrSession session, - int state, - long time - ) { - type(type); - next(next); - session(session); - state(state); - time(time); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrEventDataSessionStateChanged set(XrEventDataSessionStateChanged src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrEventDataSessionStateChanged} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrEventDataSessionStateChanged malloc() { - return wrap(XrEventDataSessionStateChanged.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrEventDataSessionStateChanged} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrEventDataSessionStateChanged calloc() { - return wrap(XrEventDataSessionStateChanged.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrEventDataSessionStateChanged} instance allocated with {@link BufferUtils}. */ - public static XrEventDataSessionStateChanged create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrEventDataSessionStateChanged.class, memAddress(container), container); - } - - /** Returns a new {@code XrEventDataSessionStateChanged} instance for the specified memory address. */ - public static XrEventDataSessionStateChanged create(long address) { - return wrap(XrEventDataSessionStateChanged.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrEventDataSessionStateChanged createSafe(long address) { - return address == NULL ? null : wrap(XrEventDataSessionStateChanged.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrEventDataSessionStateChanged.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrEventDataSessionStateChanged} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrEventDataSessionStateChanged malloc(MemoryStack stack) { - return wrap(XrEventDataSessionStateChanged.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrEventDataSessionStateChanged} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrEventDataSessionStateChanged calloc(MemoryStack stack) { - return wrap(XrEventDataSessionStateChanged.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrEventDataSessionStateChanged.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrEventDataSessionStateChanged.NEXT); } - /** Unsafe version of {@link #session}. */ - public static long nsession(long struct) { return memGetAddress(struct + XrEventDataSessionStateChanged.SESSION); } - /** Unsafe version of {@link #state}. */ - public static int nstate(long struct) { return UNSAFE.getInt(null, struct + XrEventDataSessionStateChanged.STATE); } - /** Unsafe version of {@link #time}. */ - public static long ntime(long struct) { return UNSAFE.getLong(null, struct + XrEventDataSessionStateChanged.TIME); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrEventDataSessionStateChanged.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrEventDataSessionStateChanged.NEXT, value); } - /** Unsafe version of {@link #session(XrSession) session}. */ - public static void nsession(long struct, XrSession value) { memPutAddress(struct + XrEventDataSessionStateChanged.SESSION, value.address()); } - /** Unsafe version of {@link #state(int) state}. */ - public static void nstate(long struct, int value) { UNSAFE.putInt(null, struct + XrEventDataSessionStateChanged.STATE, value); } - /** Unsafe version of {@link #time(long) time}. */ - public static void ntime(long struct, long value) { UNSAFE.putLong(null, struct + XrEventDataSessionStateChanged.TIME, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XrEventDataSessionStateChanged.SESSION)); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrEventDataSessionStateChanged} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrEventDataSessionStateChanged ELEMENT_FACTORY = XrEventDataSessionStateChanged.create(-1L); - - /** - * Creates a new {@code XrEventDataSessionStateChanged.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrEventDataSessionStateChanged#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrEventDataSessionStateChanged getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrEventDataSessionStateChanged.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrEventDataSessionStateChanged.nnext(address()); } - /** @return the value of the {@code session} field. */ - @NativeType("XrSession") - public long session() { return XrEventDataSessionStateChanged.nsession(address()); } - /** @return the value of the {@code state} field. */ - @NativeType("XrSessionState") - public int state() { return XrEventDataSessionStateChanged.nstate(address()); } - /** @return the value of the {@code time} field. */ - @NativeType("XrTime") - public long time() { return XrEventDataSessionStateChanged.ntime(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrEventDataSessionStateChanged.ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_EVENT_DATA_SESSION_STATE_CHANGED TYPE_EVENT_DATA_SESSION_STATE_CHANGED} value to the {@code type} field. */ - public Buffer type$Default() { return type(XR10.XR_TYPE_EVENT_DATA_SESSION_STATE_CHANGED); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrEventDataSessionStateChanged.nnext(address(), value); return this; } - /** Sets the specified value to the {@code session} field. */ - public Buffer session(XrSession value) { XrEventDataSessionStateChanged.nsession(address(), value); return this; } - /** Sets the specified value to the {@code state} field. */ - public Buffer state(@NativeType("XrSessionState") int value) { XrEventDataSessionStateChanged.nstate(address(), value); return this; } - /** Sets the specified value to the {@code time} field. */ - public Buffer time(@NativeType("XrTime") long value) { XrEventDataSessionStateChanged.ntime(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrEventDataVisibilityMaskChangedKHR.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrEventDataVisibilityMaskChangedKHR.java deleted file mode 100644 index d482143d..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrEventDataVisibilityMaskChangedKHR.java +++ /dev/null @@ -1,361 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrEventDataVisibilityMaskChangedKHR {
- *     XrStructureType type;
- *     void const * next;
- *     XrSession session;
- *     XrViewConfigurationType viewConfigurationType;
- *     uint32_t viewIndex;
- * }
- */ -public class XrEventDataVisibilityMaskChangedKHR extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - SESSION, - VIEWCONFIGURATIONTYPE, - VIEWINDEX; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - SESSION = layout.offsetof(2); - VIEWCONFIGURATIONTYPE = layout.offsetof(3); - VIEWINDEX = layout.offsetof(4); - } - - /** - * Creates a {@code XrEventDataVisibilityMaskChangedKHR} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrEventDataVisibilityMaskChangedKHR(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code session} field. */ - @NativeType("XrSession") - public long session() { return nsession(address()); } - /** @return the value of the {@code viewConfigurationType} field. */ - @NativeType("XrViewConfigurationType") - public int viewConfigurationType() { return nviewConfigurationType(address()); } - /** @return the value of the {@code viewIndex} field. */ - @NativeType("uint32_t") - public int viewIndex() { return nviewIndex(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrEventDataVisibilityMaskChangedKHR type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link KHRVisibilityMask#XR_TYPE_EVENT_DATA_VISIBILITY_MASK_CHANGED_KHR TYPE_EVENT_DATA_VISIBILITY_MASK_CHANGED_KHR} value to the {@code type} field. */ - public XrEventDataVisibilityMaskChangedKHR type$Default() { return type(KHRVisibilityMask.XR_TYPE_EVENT_DATA_VISIBILITY_MASK_CHANGED_KHR); } - /** Sets the specified value to the {@code next} field. */ - public XrEventDataVisibilityMaskChangedKHR next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code session} field. */ - public XrEventDataVisibilityMaskChangedKHR session(XrSession value) { nsession(address(), value); return this; } - /** Sets the specified value to the {@code viewConfigurationType} field. */ - public XrEventDataVisibilityMaskChangedKHR viewConfigurationType(@NativeType("XrViewConfigurationType") int value) { nviewConfigurationType(address(), value); return this; } - /** Sets the specified value to the {@code viewIndex} field. */ - public XrEventDataVisibilityMaskChangedKHR viewIndex(@NativeType("uint32_t") int value) { nviewIndex(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrEventDataVisibilityMaskChangedKHR set( - int type, - long next, - XrSession session, - int viewConfigurationType, - int viewIndex - ) { - type(type); - next(next); - session(session); - viewConfigurationType(viewConfigurationType); - viewIndex(viewIndex); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrEventDataVisibilityMaskChangedKHR set(XrEventDataVisibilityMaskChangedKHR src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrEventDataVisibilityMaskChangedKHR} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrEventDataVisibilityMaskChangedKHR malloc() { - return wrap(XrEventDataVisibilityMaskChangedKHR.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrEventDataVisibilityMaskChangedKHR} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrEventDataVisibilityMaskChangedKHR calloc() { - return wrap(XrEventDataVisibilityMaskChangedKHR.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrEventDataVisibilityMaskChangedKHR} instance allocated with {@link BufferUtils}. */ - public static XrEventDataVisibilityMaskChangedKHR create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrEventDataVisibilityMaskChangedKHR.class, memAddress(container), container); - } - - /** Returns a new {@code XrEventDataVisibilityMaskChangedKHR} instance for the specified memory address. */ - public static XrEventDataVisibilityMaskChangedKHR create(long address) { - return wrap(XrEventDataVisibilityMaskChangedKHR.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrEventDataVisibilityMaskChangedKHR createSafe(long address) { - return address == NULL ? null : wrap(XrEventDataVisibilityMaskChangedKHR.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrEventDataVisibilityMaskChangedKHR.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrEventDataVisibilityMaskChangedKHR} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrEventDataVisibilityMaskChangedKHR malloc(MemoryStack stack) { - return wrap(XrEventDataVisibilityMaskChangedKHR.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrEventDataVisibilityMaskChangedKHR} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrEventDataVisibilityMaskChangedKHR calloc(MemoryStack stack) { - return wrap(XrEventDataVisibilityMaskChangedKHR.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrEventDataVisibilityMaskChangedKHR.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrEventDataVisibilityMaskChangedKHR.NEXT); } - /** Unsafe version of {@link #session}. */ - public static long nsession(long struct) { return memGetAddress(struct + XrEventDataVisibilityMaskChangedKHR.SESSION); } - /** Unsafe version of {@link #viewConfigurationType}. */ - public static int nviewConfigurationType(long struct) { return UNSAFE.getInt(null, struct + XrEventDataVisibilityMaskChangedKHR.VIEWCONFIGURATIONTYPE); } - /** Unsafe version of {@link #viewIndex}. */ - public static int nviewIndex(long struct) { return UNSAFE.getInt(null, struct + XrEventDataVisibilityMaskChangedKHR.VIEWINDEX); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrEventDataVisibilityMaskChangedKHR.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrEventDataVisibilityMaskChangedKHR.NEXT, value); } - /** Unsafe version of {@link #session(XrSession) session}. */ - public static void nsession(long struct, XrSession value) { memPutAddress(struct + XrEventDataVisibilityMaskChangedKHR.SESSION, value.address()); } - /** Unsafe version of {@link #viewConfigurationType(int) viewConfigurationType}. */ - public static void nviewConfigurationType(long struct, int value) { UNSAFE.putInt(null, struct + XrEventDataVisibilityMaskChangedKHR.VIEWCONFIGURATIONTYPE, value); } - /** Unsafe version of {@link #viewIndex(int) viewIndex}. */ - public static void nviewIndex(long struct, int value) { UNSAFE.putInt(null, struct + XrEventDataVisibilityMaskChangedKHR.VIEWINDEX, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XrEventDataVisibilityMaskChangedKHR.SESSION)); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrEventDataVisibilityMaskChangedKHR} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrEventDataVisibilityMaskChangedKHR ELEMENT_FACTORY = XrEventDataVisibilityMaskChangedKHR.create(-1L); - - /** - * Creates a new {@code XrEventDataVisibilityMaskChangedKHR.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrEventDataVisibilityMaskChangedKHR#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrEventDataVisibilityMaskChangedKHR getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrEventDataVisibilityMaskChangedKHR.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrEventDataVisibilityMaskChangedKHR.nnext(address()); } - /** @return the value of the {@code session} field. */ - @NativeType("XrSession") - public long session() { return XrEventDataVisibilityMaskChangedKHR.nsession(address()); } - /** @return the value of the {@code viewConfigurationType} field. */ - @NativeType("XrViewConfigurationType") - public int viewConfigurationType() { return XrEventDataVisibilityMaskChangedKHR.nviewConfigurationType(address()); } - /** @return the value of the {@code viewIndex} field. */ - @NativeType("uint32_t") - public int viewIndex() { return XrEventDataVisibilityMaskChangedKHR.nviewIndex(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrEventDataVisibilityMaskChangedKHR.ntype(address(), value); return this; } - /** Sets the {@link KHRVisibilityMask#XR_TYPE_EVENT_DATA_VISIBILITY_MASK_CHANGED_KHR TYPE_EVENT_DATA_VISIBILITY_MASK_CHANGED_KHR} value to the {@code type} field. */ - public Buffer type$Default() { return type(KHRVisibilityMask.XR_TYPE_EVENT_DATA_VISIBILITY_MASK_CHANGED_KHR); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrEventDataVisibilityMaskChangedKHR.nnext(address(), value); return this; } - /** Sets the specified value to the {@code session} field. */ - public Buffer session(XrSession value) { XrEventDataVisibilityMaskChangedKHR.nsession(address(), value); return this; } - /** Sets the specified value to the {@code viewConfigurationType} field. */ - public Buffer viewConfigurationType(@NativeType("XrViewConfigurationType") int value) { XrEventDataVisibilityMaskChangedKHR.nviewConfigurationType(address(), value); return this; } - /** Sets the specified value to the {@code viewIndex} field. */ - public Buffer viewIndex(@NativeType("uint32_t") int value) { XrEventDataVisibilityMaskChangedKHR.nviewIndex(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrEventDataViveTrackerConnectedHTCX.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrEventDataViveTrackerConnectedHTCX.java deleted file mode 100644 index 57be2cad..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrEventDataViveTrackerConnectedHTCX.java +++ /dev/null @@ -1,321 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrEventDataViveTrackerConnectedHTCX {
- *     XrStructureType type;
- *     void const * next;
- *     {@link XrViveTrackerPathsHTCX XrViveTrackerPathsHTCX} * paths;
- * }
- */ -public class XrEventDataViveTrackerConnectedHTCX extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - PATHS; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - PATHS = layout.offsetof(2); - } - - /** - * Creates a {@code XrEventDataViveTrackerConnectedHTCX} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrEventDataViveTrackerConnectedHTCX(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return a {@link XrViveTrackerPathsHTCX} view of the struct pointed to by the {@code paths} field. */ - @NativeType("XrViveTrackerPathsHTCX *") - public XrViveTrackerPathsHTCX paths() { return npaths(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrEventDataViveTrackerConnectedHTCX type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link HTCXViveTrackerInteraction#XR_TYPE_EVENT_DATA_VIVE_TRACKER_CONNECTED_HTCX TYPE_EVENT_DATA_VIVE_TRACKER_CONNECTED_HTCX} value to the {@code type} field. */ - public XrEventDataViveTrackerConnectedHTCX type$Default() { return type(HTCXViveTrackerInteraction.XR_TYPE_EVENT_DATA_VIVE_TRACKER_CONNECTED_HTCX); } - /** Sets the specified value to the {@code next} field. */ - public XrEventDataViveTrackerConnectedHTCX next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the address of the specified {@link XrViveTrackerPathsHTCX} to the {@code paths} field. */ - public XrEventDataViveTrackerConnectedHTCX paths(@NativeType("XrViveTrackerPathsHTCX *") XrViveTrackerPathsHTCX value) { npaths(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrEventDataViveTrackerConnectedHTCX set( - int type, - long next, - XrViveTrackerPathsHTCX paths - ) { - type(type); - next(next); - paths(paths); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrEventDataViveTrackerConnectedHTCX set(XrEventDataViveTrackerConnectedHTCX src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrEventDataViveTrackerConnectedHTCX} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrEventDataViveTrackerConnectedHTCX malloc() { - return wrap(XrEventDataViveTrackerConnectedHTCX.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrEventDataViveTrackerConnectedHTCX} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrEventDataViveTrackerConnectedHTCX calloc() { - return wrap(XrEventDataViveTrackerConnectedHTCX.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrEventDataViveTrackerConnectedHTCX} instance allocated with {@link BufferUtils}. */ - public static XrEventDataViveTrackerConnectedHTCX create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrEventDataViveTrackerConnectedHTCX.class, memAddress(container), container); - } - - /** Returns a new {@code XrEventDataViveTrackerConnectedHTCX} instance for the specified memory address. */ - public static XrEventDataViveTrackerConnectedHTCX create(long address) { - return wrap(XrEventDataViveTrackerConnectedHTCX.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrEventDataViveTrackerConnectedHTCX createSafe(long address) { - return address == NULL ? null : wrap(XrEventDataViveTrackerConnectedHTCX.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrEventDataViveTrackerConnectedHTCX.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrEventDataViveTrackerConnectedHTCX} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrEventDataViveTrackerConnectedHTCX malloc(MemoryStack stack) { - return wrap(XrEventDataViveTrackerConnectedHTCX.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrEventDataViveTrackerConnectedHTCX} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrEventDataViveTrackerConnectedHTCX calloc(MemoryStack stack) { - return wrap(XrEventDataViveTrackerConnectedHTCX.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrEventDataViveTrackerConnectedHTCX.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrEventDataViveTrackerConnectedHTCX.NEXT); } - /** Unsafe version of {@link #paths}. */ - public static XrViveTrackerPathsHTCX npaths(long struct) { return XrViveTrackerPathsHTCX.create(memGetAddress(struct + XrEventDataViveTrackerConnectedHTCX.PATHS)); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrEventDataViveTrackerConnectedHTCX.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrEventDataViveTrackerConnectedHTCX.NEXT, value); } - /** Unsafe version of {@link #paths(XrViveTrackerPathsHTCX) paths}. */ - public static void npaths(long struct, XrViveTrackerPathsHTCX value) { memPutAddress(struct + XrEventDataViveTrackerConnectedHTCX.PATHS, value.address()); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XrEventDataViveTrackerConnectedHTCX.PATHS)); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrEventDataViveTrackerConnectedHTCX} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrEventDataViveTrackerConnectedHTCX ELEMENT_FACTORY = XrEventDataViveTrackerConnectedHTCX.create(-1L); - - /** - * Creates a new {@code XrEventDataViveTrackerConnectedHTCX.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrEventDataViveTrackerConnectedHTCX#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrEventDataViveTrackerConnectedHTCX getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrEventDataViveTrackerConnectedHTCX.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrEventDataViveTrackerConnectedHTCX.nnext(address()); } - /** @return a {@link XrViveTrackerPathsHTCX} view of the struct pointed to by the {@code paths} field. */ - @NativeType("XrViveTrackerPathsHTCX *") - public XrViveTrackerPathsHTCX paths() { return XrEventDataViveTrackerConnectedHTCX.npaths(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrEventDataViveTrackerConnectedHTCX.ntype(address(), value); return this; } - /** Sets the {@link HTCXViveTrackerInteraction#XR_TYPE_EVENT_DATA_VIVE_TRACKER_CONNECTED_HTCX TYPE_EVENT_DATA_VIVE_TRACKER_CONNECTED_HTCX} value to the {@code type} field. */ - public Buffer type$Default() { return type(HTCXViveTrackerInteraction.XR_TYPE_EVENT_DATA_VIVE_TRACKER_CONNECTED_HTCX); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrEventDataViveTrackerConnectedHTCX.nnext(address(), value); return this; } - /** Sets the address of the specified {@link XrViveTrackerPathsHTCX} to the {@code paths} field. */ - public Buffer paths(@NativeType("XrViveTrackerPathsHTCX *") XrViveTrackerPathsHTCX value) { XrEventDataViveTrackerConnectedHTCX.npaths(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrExtensionProperties.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrExtensionProperties.java deleted file mode 100644 index 3b2779eb..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrExtensionProperties.java +++ /dev/null @@ -1,312 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.openxr.XR10.XR_MAX_EXTENSION_NAME_SIZE; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrExtensionProperties {
- *     XrStructureType type;
- *     void * next;
- *     char extensionName[XR_MAX_EXTENSION_NAME_SIZE];
- *     uint32_t extensionVersion;
- * }
- */ -public class XrExtensionProperties extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - EXTENSIONNAME, - EXTENSIONVERSION; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __array(1, XR_MAX_EXTENSION_NAME_SIZE), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - EXTENSIONNAME = layout.offsetof(2); - EXTENSIONVERSION = layout.offsetof(3); - } - - /** - * Creates a {@code XrExtensionProperties} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrExtensionProperties(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return a {@link ByteBuffer} view of the {@code extensionName} field. */ - @NativeType("char[XR_MAX_EXTENSION_NAME_SIZE]") - public ByteBuffer extensionName() { return nextensionName(address()); } - /** @return the null-terminated string stored in the {@code extensionName} field. */ - @NativeType("char[XR_MAX_EXTENSION_NAME_SIZE]") - public String extensionNameString() { return nextensionNameString(address()); } - /** @return the value of the {@code extensionVersion} field. */ - @NativeType("uint32_t") - public int extensionVersion() { return nextensionVersion(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrExtensionProperties type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_EXTENSION_PROPERTIES TYPE_EXTENSION_PROPERTIES} value to the {@code type} field. */ - public XrExtensionProperties type$Default() { return type(XR10.XR_TYPE_EXTENSION_PROPERTIES); } - /** Sets the specified value to the {@code next} field. */ - public XrExtensionProperties next(@NativeType("void *") long value) { nnext(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrExtensionProperties set( - int type, - long next - ) { - type(type); - next(next); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrExtensionProperties set(XrExtensionProperties src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrExtensionProperties} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrExtensionProperties malloc() { - return wrap(XrExtensionProperties.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrExtensionProperties} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrExtensionProperties calloc() { - return wrap(XrExtensionProperties.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrExtensionProperties} instance allocated with {@link BufferUtils}. */ - public static XrExtensionProperties create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrExtensionProperties.class, memAddress(container), container); - } - - /** Returns a new {@code XrExtensionProperties} instance for the specified memory address. */ - public static XrExtensionProperties create(long address) { - return wrap(XrExtensionProperties.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrExtensionProperties createSafe(long address) { - return address == NULL ? null : wrap(XrExtensionProperties.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrExtensionProperties.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrExtensionProperties} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrExtensionProperties malloc(MemoryStack stack) { - return wrap(XrExtensionProperties.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrExtensionProperties} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrExtensionProperties calloc(MemoryStack stack) { - return wrap(XrExtensionProperties.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrExtensionProperties.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrExtensionProperties.NEXT); } - /** Unsafe version of {@link #extensionName}. */ - public static ByteBuffer nextensionName(long struct) { return memByteBuffer(struct + XrExtensionProperties.EXTENSIONNAME, XR_MAX_EXTENSION_NAME_SIZE); } - /** Unsafe version of {@link #extensionNameString}. */ - public static String nextensionNameString(long struct) { return memUTF8(struct + XrExtensionProperties.EXTENSIONNAME); } - /** Unsafe version of {@link #extensionVersion}. */ - public static int nextensionVersion(long struct) { return UNSAFE.getInt(null, struct + XrExtensionProperties.EXTENSIONVERSION); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrExtensionProperties.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrExtensionProperties.NEXT, value); } - - // ----------------------------------- - - /** An array of {@link XrExtensionProperties} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrExtensionProperties ELEMENT_FACTORY = XrExtensionProperties.create(-1L); - - /** - * Creates a new {@code XrExtensionProperties.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrExtensionProperties#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrExtensionProperties getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrExtensionProperties.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrExtensionProperties.nnext(address()); } - /** @return a {@link ByteBuffer} view of the {@code extensionName} field. */ - @NativeType("char[XR_MAX_EXTENSION_NAME_SIZE]") - public ByteBuffer extensionName() { return XrExtensionProperties.nextensionName(address()); } - /** @return the null-terminated string stored in the {@code extensionName} field. */ - @NativeType("char[XR_MAX_EXTENSION_NAME_SIZE]") - public String extensionNameString() { return XrExtensionProperties.nextensionNameString(address()); } - /** @return the value of the {@code extensionVersion} field. */ - @NativeType("uint32_t") - public int extensionVersion() { return XrExtensionProperties.nextensionVersion(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrExtensionProperties.ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_EXTENSION_PROPERTIES TYPE_EXTENSION_PROPERTIES} value to the {@code type} field. */ - public Buffer type$Default() { return type(XR10.XR_TYPE_EXTENSION_PROPERTIES); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrExtensionProperties.nnext(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrExtent2Df.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrExtent2Df.java deleted file mode 100644 index 8ab726fd..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrExtent2Df.java +++ /dev/null @@ -1,271 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrExtent2Df {
- *     float width;
- *     float height;
- * }
- */ -public class XrExtent2Df extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - WIDTH, - HEIGHT; - - static { - Layout layout = __struct( - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - WIDTH = layout.offsetof(0); - HEIGHT = layout.offsetof(1); - } - - /** - * Creates a {@code XrExtent2Df} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrExtent2Df(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code width} field. */ - public float width() { return nwidth(address()); } - /** @return the value of the {@code height} field. */ - public float height() { return nheight(address()); } - - /** Sets the specified value to the {@code width} field. */ - public XrExtent2Df width(float value) { nwidth(address(), value); return this; } - /** Sets the specified value to the {@code height} field. */ - public XrExtent2Df height(float value) { nheight(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrExtent2Df set( - float width, - float height - ) { - width(width); - height(height); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrExtent2Df set(XrExtent2Df src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrExtent2Df} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrExtent2Df malloc() { - return wrap(XrExtent2Df.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrExtent2Df} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrExtent2Df calloc() { - return wrap(XrExtent2Df.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrExtent2Df} instance allocated with {@link BufferUtils}. */ - public static XrExtent2Df create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrExtent2Df.class, memAddress(container), container); - } - - /** Returns a new {@code XrExtent2Df} instance for the specified memory address. */ - public static XrExtent2Df create(long address) { - return wrap(XrExtent2Df.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrExtent2Df createSafe(long address) { - return address == NULL ? null : wrap(XrExtent2Df.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrExtent2Df.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrExtent2Df} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrExtent2Df malloc(MemoryStack stack) { - return wrap(XrExtent2Df.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrExtent2Df} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrExtent2Df calloc(MemoryStack stack) { - return wrap(XrExtent2Df.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #width}. */ - public static float nwidth(long struct) { return UNSAFE.getFloat(null, struct + XrExtent2Df.WIDTH); } - /** Unsafe version of {@link #height}. */ - public static float nheight(long struct) { return UNSAFE.getFloat(null, struct + XrExtent2Df.HEIGHT); } - - /** Unsafe version of {@link #width(float) width}. */ - public static void nwidth(long struct, float value) { UNSAFE.putFloat(null, struct + XrExtent2Df.WIDTH, value); } - /** Unsafe version of {@link #height(float) height}. */ - public static void nheight(long struct, float value) { UNSAFE.putFloat(null, struct + XrExtent2Df.HEIGHT, value); } - - // ----------------------------------- - - /** An array of {@link XrExtent2Df} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrExtent2Df ELEMENT_FACTORY = XrExtent2Df.create(-1L); - - /** - * Creates a new {@code XrExtent2Df.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrExtent2Df#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrExtent2Df getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code width} field. */ - public float width() { return XrExtent2Df.nwidth(address()); } - /** @return the value of the {@code height} field. */ - public float height() { return XrExtent2Df.nheight(address()); } - - /** Sets the specified value to the {@code width} field. */ - public Buffer width(float value) { XrExtent2Df.nwidth(address(), value); return this; } - /** Sets the specified value to the {@code height} field. */ - public Buffer height(float value) { XrExtent2Df.nheight(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrExtent2Di.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrExtent2Di.java deleted file mode 100644 index cc4a0100..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrExtent2Di.java +++ /dev/null @@ -1,275 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrExtent2Di {
- *     int32_t width;
- *     int32_t height;
- * }
- */ -public class XrExtent2Di extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - WIDTH, - HEIGHT; - - static { - Layout layout = __struct( - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - WIDTH = layout.offsetof(0); - HEIGHT = layout.offsetof(1); - } - - /** - * Creates a {@code XrExtent2Di} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrExtent2Di(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code width} field. */ - @NativeType("int32_t") - public int width() { return nwidth(address()); } - /** @return the value of the {@code height} field. */ - @NativeType("int32_t") - public int height() { return nheight(address()); } - - /** Sets the specified value to the {@code width} field. */ - public XrExtent2Di width(@NativeType("int32_t") int value) { nwidth(address(), value); return this; } - /** Sets the specified value to the {@code height} field. */ - public XrExtent2Di height(@NativeType("int32_t") int value) { nheight(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrExtent2Di set( - int width, - int height - ) { - width(width); - height(height); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrExtent2Di set(XrExtent2Di src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrExtent2Di} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrExtent2Di malloc() { - return wrap(XrExtent2Di.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrExtent2Di} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrExtent2Di calloc() { - return wrap(XrExtent2Di.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrExtent2Di} instance allocated with {@link BufferUtils}. */ - public static XrExtent2Di create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrExtent2Di.class, memAddress(container), container); - } - - /** Returns a new {@code XrExtent2Di} instance for the specified memory address. */ - public static XrExtent2Di create(long address) { - return wrap(XrExtent2Di.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrExtent2Di createSafe(long address) { - return address == NULL ? null : wrap(XrExtent2Di.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrExtent2Di.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrExtent2Di} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrExtent2Di malloc(MemoryStack stack) { - return wrap(XrExtent2Di.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrExtent2Di} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrExtent2Di calloc(MemoryStack stack) { - return wrap(XrExtent2Di.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #width}. */ - public static int nwidth(long struct) { return UNSAFE.getInt(null, struct + XrExtent2Di.WIDTH); } - /** Unsafe version of {@link #height}. */ - public static int nheight(long struct) { return UNSAFE.getInt(null, struct + XrExtent2Di.HEIGHT); } - - /** Unsafe version of {@link #width(int) width}. */ - public static void nwidth(long struct, int value) { UNSAFE.putInt(null, struct + XrExtent2Di.WIDTH, value); } - /** Unsafe version of {@link #height(int) height}. */ - public static void nheight(long struct, int value) { UNSAFE.putInt(null, struct + XrExtent2Di.HEIGHT, value); } - - // ----------------------------------- - - /** An array of {@link XrExtent2Di} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrExtent2Di ELEMENT_FACTORY = XrExtent2Di.create(-1L); - - /** - * Creates a new {@code XrExtent2Di.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrExtent2Di#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrExtent2Di getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code width} field. */ - @NativeType("int32_t") - public int width() { return XrExtent2Di.nwidth(address()); } - /** @return the value of the {@code height} field. */ - @NativeType("int32_t") - public int height() { return XrExtent2Di.nheight(address()); } - - /** Sets the specified value to the {@code width} field. */ - public Buffer width(@NativeType("int32_t") int value) { XrExtent2Di.nwidth(address(), value); return this; } - /** Sets the specified value to the {@code height} field. */ - public Buffer height(@NativeType("int32_t") int value) { XrExtent2Di.nheight(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrEyeGazeSampleTimeEXT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrEyeGazeSampleTimeEXT.java deleted file mode 100644 index de364407..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrEyeGazeSampleTimeEXT.java +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrEyeGazeSampleTimeEXT {
- *     XrStructureType type;
- *     void * next;
- *     XrTime time;
- * }
- */ -public class XrEyeGazeSampleTimeEXT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - TIME; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(8) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - TIME = layout.offsetof(2); - } - - /** - * Creates a {@code XrEyeGazeSampleTimeEXT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrEyeGazeSampleTimeEXT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return the value of the {@code time} field. */ - @NativeType("XrTime") - public long time() { return ntime(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrEyeGazeSampleTimeEXT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link EXTEyeGazeInteraction#XR_TYPE_EYE_GAZE_SAMPLE_TIME_EXT TYPE_EYE_GAZE_SAMPLE_TIME_EXT} value to the {@code type} field. */ - public XrEyeGazeSampleTimeEXT type$Default() { return type(EXTEyeGazeInteraction.XR_TYPE_EYE_GAZE_SAMPLE_TIME_EXT); } - /** Sets the specified value to the {@code next} field. */ - public XrEyeGazeSampleTimeEXT next(@NativeType("void *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code time} field. */ - public XrEyeGazeSampleTimeEXT time(@NativeType("XrTime") long value) { ntime(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrEyeGazeSampleTimeEXT set( - int type, - long next, - long time - ) { - type(type); - next(next); - time(time); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrEyeGazeSampleTimeEXT set(XrEyeGazeSampleTimeEXT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrEyeGazeSampleTimeEXT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrEyeGazeSampleTimeEXT malloc() { - return wrap(XrEyeGazeSampleTimeEXT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrEyeGazeSampleTimeEXT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrEyeGazeSampleTimeEXT calloc() { - return wrap(XrEyeGazeSampleTimeEXT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrEyeGazeSampleTimeEXT} instance allocated with {@link BufferUtils}. */ - public static XrEyeGazeSampleTimeEXT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrEyeGazeSampleTimeEXT.class, memAddress(container), container); - } - - /** Returns a new {@code XrEyeGazeSampleTimeEXT} instance for the specified memory address. */ - public static XrEyeGazeSampleTimeEXT create(long address) { - return wrap(XrEyeGazeSampleTimeEXT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrEyeGazeSampleTimeEXT createSafe(long address) { - return address == NULL ? null : wrap(XrEyeGazeSampleTimeEXT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrEyeGazeSampleTimeEXT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrEyeGazeSampleTimeEXT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrEyeGazeSampleTimeEXT malloc(MemoryStack stack) { - return wrap(XrEyeGazeSampleTimeEXT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrEyeGazeSampleTimeEXT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrEyeGazeSampleTimeEXT calloc(MemoryStack stack) { - return wrap(XrEyeGazeSampleTimeEXT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrEyeGazeSampleTimeEXT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrEyeGazeSampleTimeEXT.NEXT); } - /** Unsafe version of {@link #time}. */ - public static long ntime(long struct) { return UNSAFE.getLong(null, struct + XrEyeGazeSampleTimeEXT.TIME); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrEyeGazeSampleTimeEXT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrEyeGazeSampleTimeEXT.NEXT, value); } - /** Unsafe version of {@link #time(long) time}. */ - public static void ntime(long struct, long value) { UNSAFE.putLong(null, struct + XrEyeGazeSampleTimeEXT.TIME, value); } - - // ----------------------------------- - - /** An array of {@link XrEyeGazeSampleTimeEXT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrEyeGazeSampleTimeEXT ELEMENT_FACTORY = XrEyeGazeSampleTimeEXT.create(-1L); - - /** - * Creates a new {@code XrEyeGazeSampleTimeEXT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrEyeGazeSampleTimeEXT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrEyeGazeSampleTimeEXT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrEyeGazeSampleTimeEXT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrEyeGazeSampleTimeEXT.nnext(address()); } - /** @return the value of the {@code time} field. */ - @NativeType("XrTime") - public long time() { return XrEyeGazeSampleTimeEXT.ntime(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrEyeGazeSampleTimeEXT.ntype(address(), value); return this; } - /** Sets the {@link EXTEyeGazeInteraction#XR_TYPE_EYE_GAZE_SAMPLE_TIME_EXT TYPE_EYE_GAZE_SAMPLE_TIME_EXT} value to the {@code type} field. */ - public Buffer type$Default() { return type(EXTEyeGazeInteraction.XR_TYPE_EYE_GAZE_SAMPLE_TIME_EXT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrEyeGazeSampleTimeEXT.nnext(address(), value); return this; } - /** Sets the specified value to the {@code time} field. */ - public Buffer time(@NativeType("XrTime") long value) { XrEyeGazeSampleTimeEXT.ntime(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrFoveatedViewConfigurationViewVARJO.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrFoveatedViewConfigurationViewVARJO.java deleted file mode 100644 index 1554e34a..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrFoveatedViewConfigurationViewVARJO.java +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrFoveatedViewConfigurationViewVARJO {
- *     XrStructureType type;
- *     void * next;
- *     XrBool32 foveatedRenderingActive;
- * }
- */ -public class XrFoveatedViewConfigurationViewVARJO extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - FOVEATEDRENDERINGACTIVE; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - FOVEATEDRENDERINGACTIVE = layout.offsetof(2); - } - - /** - * Creates a {@code XrFoveatedViewConfigurationViewVARJO} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrFoveatedViewConfigurationViewVARJO(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return the value of the {@code foveatedRenderingActive} field. */ - @NativeType("XrBool32") - public boolean foveatedRenderingActive() { return nfoveatedRenderingActive(address()) != 0; } - - /** Sets the specified value to the {@code type} field. */ - public XrFoveatedViewConfigurationViewVARJO type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link VARJOFoveatedRendering#XR_TYPE_FOVEATED_VIEW_CONFIGURATION_VIEW_VARJO TYPE_FOVEATED_VIEW_CONFIGURATION_VIEW_VARJO} value to the {@code type} field. */ - public XrFoveatedViewConfigurationViewVARJO type$Default() { return type(VARJOFoveatedRendering.XR_TYPE_FOVEATED_VIEW_CONFIGURATION_VIEW_VARJO); } - /** Sets the specified value to the {@code next} field. */ - public XrFoveatedViewConfigurationViewVARJO next(@NativeType("void *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code foveatedRenderingActive} field. */ - public XrFoveatedViewConfigurationViewVARJO foveatedRenderingActive(@NativeType("XrBool32") boolean value) { nfoveatedRenderingActive(address(), value ? 1 : 0); return this; } - - /** Initializes this struct with the specified values. */ - public XrFoveatedViewConfigurationViewVARJO set( - int type, - long next, - boolean foveatedRenderingActive - ) { - type(type); - next(next); - foveatedRenderingActive(foveatedRenderingActive); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrFoveatedViewConfigurationViewVARJO set(XrFoveatedViewConfigurationViewVARJO src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrFoveatedViewConfigurationViewVARJO} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrFoveatedViewConfigurationViewVARJO malloc() { - return wrap(XrFoveatedViewConfigurationViewVARJO.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrFoveatedViewConfigurationViewVARJO} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrFoveatedViewConfigurationViewVARJO calloc() { - return wrap(XrFoveatedViewConfigurationViewVARJO.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrFoveatedViewConfigurationViewVARJO} instance allocated with {@link BufferUtils}. */ - public static XrFoveatedViewConfigurationViewVARJO create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrFoveatedViewConfigurationViewVARJO.class, memAddress(container), container); - } - - /** Returns a new {@code XrFoveatedViewConfigurationViewVARJO} instance for the specified memory address. */ - public static XrFoveatedViewConfigurationViewVARJO create(long address) { - return wrap(XrFoveatedViewConfigurationViewVARJO.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrFoveatedViewConfigurationViewVARJO createSafe(long address) { - return address == NULL ? null : wrap(XrFoveatedViewConfigurationViewVARJO.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrFoveatedViewConfigurationViewVARJO.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrFoveatedViewConfigurationViewVARJO} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrFoveatedViewConfigurationViewVARJO malloc(MemoryStack stack) { - return wrap(XrFoveatedViewConfigurationViewVARJO.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrFoveatedViewConfigurationViewVARJO} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrFoveatedViewConfigurationViewVARJO calloc(MemoryStack stack) { - return wrap(XrFoveatedViewConfigurationViewVARJO.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrFoveatedViewConfigurationViewVARJO.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrFoveatedViewConfigurationViewVARJO.NEXT); } - /** Unsafe version of {@link #foveatedRenderingActive}. */ - public static int nfoveatedRenderingActive(long struct) { return UNSAFE.getInt(null, struct + XrFoveatedViewConfigurationViewVARJO.FOVEATEDRENDERINGACTIVE); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrFoveatedViewConfigurationViewVARJO.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrFoveatedViewConfigurationViewVARJO.NEXT, value); } - /** Unsafe version of {@link #foveatedRenderingActive(boolean) foveatedRenderingActive}. */ - public static void nfoveatedRenderingActive(long struct, int value) { UNSAFE.putInt(null, struct + XrFoveatedViewConfigurationViewVARJO.FOVEATEDRENDERINGACTIVE, value); } - - // ----------------------------------- - - /** An array of {@link XrFoveatedViewConfigurationViewVARJO} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrFoveatedViewConfigurationViewVARJO ELEMENT_FACTORY = XrFoveatedViewConfigurationViewVARJO.create(-1L); - - /** - * Creates a new {@code XrFoveatedViewConfigurationViewVARJO.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrFoveatedViewConfigurationViewVARJO#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrFoveatedViewConfigurationViewVARJO getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrFoveatedViewConfigurationViewVARJO.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrFoveatedViewConfigurationViewVARJO.nnext(address()); } - /** @return the value of the {@code foveatedRenderingActive} field. */ - @NativeType("XrBool32") - public boolean foveatedRenderingActive() { return XrFoveatedViewConfigurationViewVARJO.nfoveatedRenderingActive(address()) != 0; } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrFoveatedViewConfigurationViewVARJO.ntype(address(), value); return this; } - /** Sets the {@link VARJOFoveatedRendering#XR_TYPE_FOVEATED_VIEW_CONFIGURATION_VIEW_VARJO TYPE_FOVEATED_VIEW_CONFIGURATION_VIEW_VARJO} value to the {@code type} field. */ - public Buffer type$Default() { return type(VARJOFoveatedRendering.XR_TYPE_FOVEATED_VIEW_CONFIGURATION_VIEW_VARJO); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrFoveatedViewConfigurationViewVARJO.nnext(address(), value); return this; } - /** Sets the specified value to the {@code foveatedRenderingActive} field. */ - public Buffer foveatedRenderingActive(@NativeType("XrBool32") boolean value) { XrFoveatedViewConfigurationViewVARJO.nfoveatedRenderingActive(address(), value ? 1 : 0); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrFoveationLevelProfileCreateInfoFB.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrFoveationLevelProfileCreateInfoFB.java deleted file mode 100644 index e78e0bc4..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrFoveationLevelProfileCreateInfoFB.java +++ /dev/null @@ -1,337 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrFoveationLevelProfileCreateInfoFB {
- *     XrStructureType type;
- *     void * next;
- *     XrFoveationLevelFB level;
- *     float verticalOffset;
- *     XrFoveationDynamicFB dynamic;
- * }
- */ -public class XrFoveationLevelProfileCreateInfoFB extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - LEVEL, - VERTICALOFFSET, - DYNAMIC; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - LEVEL = layout.offsetof(2); - VERTICALOFFSET = layout.offsetof(3); - DYNAMIC = layout.offsetof(4); - } - - /** - * Creates a {@code XrFoveationLevelProfileCreateInfoFB} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrFoveationLevelProfileCreateInfoFB(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return the value of the {@code level} field. */ - @NativeType("XrFoveationLevelFB") - public int level() { return nlevel(address()); } - /** @return the value of the {@code verticalOffset} field. */ - public float verticalOffset() { return nverticalOffset(address()); } - /** @return the value of the {@code dynamic} field. */ - @NativeType("XrFoveationDynamicFB") - public int dynamic() { return ndynamic(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrFoveationLevelProfileCreateInfoFB type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link FBFoveationConfiguration#XR_TYPE_FOVEATION_LEVEL_PROFILE_CREATE_INFO_FB TYPE_FOVEATION_LEVEL_PROFILE_CREATE_INFO_FB} value to the {@code type} field. */ - public XrFoveationLevelProfileCreateInfoFB type$Default() { return type(FBFoveationConfiguration.XR_TYPE_FOVEATION_LEVEL_PROFILE_CREATE_INFO_FB); } - /** Sets the specified value to the {@code next} field. */ - public XrFoveationLevelProfileCreateInfoFB next(@NativeType("void *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code level} field. */ - public XrFoveationLevelProfileCreateInfoFB level(@NativeType("XrFoveationLevelFB") int value) { nlevel(address(), value); return this; } - /** Sets the specified value to the {@code verticalOffset} field. */ - public XrFoveationLevelProfileCreateInfoFB verticalOffset(float value) { nverticalOffset(address(), value); return this; } - /** Sets the specified value to the {@code dynamic} field. */ - public XrFoveationLevelProfileCreateInfoFB dynamic(@NativeType("XrFoveationDynamicFB") int value) { ndynamic(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrFoveationLevelProfileCreateInfoFB set( - int type, - long next, - int level, - float verticalOffset, - int dynamic - ) { - type(type); - next(next); - level(level); - verticalOffset(verticalOffset); - dynamic(dynamic); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrFoveationLevelProfileCreateInfoFB set(XrFoveationLevelProfileCreateInfoFB src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrFoveationLevelProfileCreateInfoFB} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrFoveationLevelProfileCreateInfoFB malloc() { - return wrap(XrFoveationLevelProfileCreateInfoFB.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrFoveationLevelProfileCreateInfoFB} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrFoveationLevelProfileCreateInfoFB calloc() { - return wrap(XrFoveationLevelProfileCreateInfoFB.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrFoveationLevelProfileCreateInfoFB} instance allocated with {@link BufferUtils}. */ - public static XrFoveationLevelProfileCreateInfoFB create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrFoveationLevelProfileCreateInfoFB.class, memAddress(container), container); - } - - /** Returns a new {@code XrFoveationLevelProfileCreateInfoFB} instance for the specified memory address. */ - public static XrFoveationLevelProfileCreateInfoFB create(long address) { - return wrap(XrFoveationLevelProfileCreateInfoFB.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrFoveationLevelProfileCreateInfoFB createSafe(long address) { - return address == NULL ? null : wrap(XrFoveationLevelProfileCreateInfoFB.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrFoveationLevelProfileCreateInfoFB.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrFoveationLevelProfileCreateInfoFB} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrFoveationLevelProfileCreateInfoFB malloc(MemoryStack stack) { - return wrap(XrFoveationLevelProfileCreateInfoFB.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrFoveationLevelProfileCreateInfoFB} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrFoveationLevelProfileCreateInfoFB calloc(MemoryStack stack) { - return wrap(XrFoveationLevelProfileCreateInfoFB.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrFoveationLevelProfileCreateInfoFB.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrFoveationLevelProfileCreateInfoFB.NEXT); } - /** Unsafe version of {@link #level}. */ - public static int nlevel(long struct) { return UNSAFE.getInt(null, struct + XrFoveationLevelProfileCreateInfoFB.LEVEL); } - /** Unsafe version of {@link #verticalOffset}. */ - public static float nverticalOffset(long struct) { return UNSAFE.getFloat(null, struct + XrFoveationLevelProfileCreateInfoFB.VERTICALOFFSET); } - /** Unsafe version of {@link #dynamic}. */ - public static int ndynamic(long struct) { return UNSAFE.getInt(null, struct + XrFoveationLevelProfileCreateInfoFB.DYNAMIC); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrFoveationLevelProfileCreateInfoFB.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrFoveationLevelProfileCreateInfoFB.NEXT, value); } - /** Unsafe version of {@link #level(int) level}. */ - public static void nlevel(long struct, int value) { UNSAFE.putInt(null, struct + XrFoveationLevelProfileCreateInfoFB.LEVEL, value); } - /** Unsafe version of {@link #verticalOffset(float) verticalOffset}. */ - public static void nverticalOffset(long struct, float value) { UNSAFE.putFloat(null, struct + XrFoveationLevelProfileCreateInfoFB.VERTICALOFFSET, value); } - /** Unsafe version of {@link #dynamic(int) dynamic}. */ - public static void ndynamic(long struct, int value) { UNSAFE.putInt(null, struct + XrFoveationLevelProfileCreateInfoFB.DYNAMIC, value); } - - // ----------------------------------- - - /** An array of {@link XrFoveationLevelProfileCreateInfoFB} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrFoveationLevelProfileCreateInfoFB ELEMENT_FACTORY = XrFoveationLevelProfileCreateInfoFB.create(-1L); - - /** - * Creates a new {@code XrFoveationLevelProfileCreateInfoFB.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrFoveationLevelProfileCreateInfoFB#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrFoveationLevelProfileCreateInfoFB getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrFoveationLevelProfileCreateInfoFB.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrFoveationLevelProfileCreateInfoFB.nnext(address()); } - /** @return the value of the {@code level} field. */ - @NativeType("XrFoveationLevelFB") - public int level() { return XrFoveationLevelProfileCreateInfoFB.nlevel(address()); } - /** @return the value of the {@code verticalOffset} field. */ - public float verticalOffset() { return XrFoveationLevelProfileCreateInfoFB.nverticalOffset(address()); } - /** @return the value of the {@code dynamic} field. */ - @NativeType("XrFoveationDynamicFB") - public int dynamic() { return XrFoveationLevelProfileCreateInfoFB.ndynamic(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrFoveationLevelProfileCreateInfoFB.ntype(address(), value); return this; } - /** Sets the {@link FBFoveationConfiguration#XR_TYPE_FOVEATION_LEVEL_PROFILE_CREATE_INFO_FB TYPE_FOVEATION_LEVEL_PROFILE_CREATE_INFO_FB} value to the {@code type} field. */ - public Buffer type$Default() { return type(FBFoveationConfiguration.XR_TYPE_FOVEATION_LEVEL_PROFILE_CREATE_INFO_FB); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrFoveationLevelProfileCreateInfoFB.nnext(address(), value); return this; } - /** Sets the specified value to the {@code level} field. */ - public Buffer level(@NativeType("XrFoveationLevelFB") int value) { XrFoveationLevelProfileCreateInfoFB.nlevel(address(), value); return this; } - /** Sets the specified value to the {@code verticalOffset} field. */ - public Buffer verticalOffset(float value) { XrFoveationLevelProfileCreateInfoFB.nverticalOffset(address(), value); return this; } - /** Sets the specified value to the {@code dynamic} field. */ - public Buffer dynamic(@NativeType("XrFoveationDynamicFB") int value) { XrFoveationLevelProfileCreateInfoFB.ndynamic(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrFoveationProfileCreateInfoFB.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrFoveationProfileCreateInfoFB.java deleted file mode 100644 index 33e693c9..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrFoveationProfileCreateInfoFB.java +++ /dev/null @@ -1,279 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrFoveationProfileCreateInfoFB {
- *     XrStructureType type;
- *     void * next;
- * }
- */ -public class XrFoveationProfileCreateInfoFB extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - } - - /** - * Creates a {@code XrFoveationProfileCreateInfoFB} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrFoveationProfileCreateInfoFB(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrFoveationProfileCreateInfoFB type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link FBFoveation#XR_TYPE_FOVEATION_PROFILE_CREATE_INFO_FB TYPE_FOVEATION_PROFILE_CREATE_INFO_FB} value to the {@code type} field. */ - public XrFoveationProfileCreateInfoFB type$Default() { return type(FBFoveation.XR_TYPE_FOVEATION_PROFILE_CREATE_INFO_FB); } - /** Sets the specified value to the {@code next} field. */ - public XrFoveationProfileCreateInfoFB next(@NativeType("void *") long value) { nnext(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrFoveationProfileCreateInfoFB set( - int type, - long next - ) { - type(type); - next(next); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrFoveationProfileCreateInfoFB set(XrFoveationProfileCreateInfoFB src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrFoveationProfileCreateInfoFB} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrFoveationProfileCreateInfoFB malloc() { - return wrap(XrFoveationProfileCreateInfoFB.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrFoveationProfileCreateInfoFB} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrFoveationProfileCreateInfoFB calloc() { - return wrap(XrFoveationProfileCreateInfoFB.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrFoveationProfileCreateInfoFB} instance allocated with {@link BufferUtils}. */ - public static XrFoveationProfileCreateInfoFB create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrFoveationProfileCreateInfoFB.class, memAddress(container), container); - } - - /** Returns a new {@code XrFoveationProfileCreateInfoFB} instance for the specified memory address. */ - public static XrFoveationProfileCreateInfoFB create(long address) { - return wrap(XrFoveationProfileCreateInfoFB.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrFoveationProfileCreateInfoFB createSafe(long address) { - return address == NULL ? null : wrap(XrFoveationProfileCreateInfoFB.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrFoveationProfileCreateInfoFB.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrFoveationProfileCreateInfoFB} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrFoveationProfileCreateInfoFB malloc(MemoryStack stack) { - return wrap(XrFoveationProfileCreateInfoFB.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrFoveationProfileCreateInfoFB} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrFoveationProfileCreateInfoFB calloc(MemoryStack stack) { - return wrap(XrFoveationProfileCreateInfoFB.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrFoveationProfileCreateInfoFB.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrFoveationProfileCreateInfoFB.NEXT); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrFoveationProfileCreateInfoFB.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrFoveationProfileCreateInfoFB.NEXT, value); } - - // ----------------------------------- - - /** An array of {@link XrFoveationProfileCreateInfoFB} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrFoveationProfileCreateInfoFB ELEMENT_FACTORY = XrFoveationProfileCreateInfoFB.create(-1L); - - /** - * Creates a new {@code XrFoveationProfileCreateInfoFB.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrFoveationProfileCreateInfoFB#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrFoveationProfileCreateInfoFB getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrFoveationProfileCreateInfoFB.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrFoveationProfileCreateInfoFB.nnext(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrFoveationProfileCreateInfoFB.ntype(address(), value); return this; } - /** Sets the {@link FBFoveation#XR_TYPE_FOVEATION_PROFILE_CREATE_INFO_FB TYPE_FOVEATION_PROFILE_CREATE_INFO_FB} value to the {@code type} field. */ - public Buffer type$Default() { return type(FBFoveation.XR_TYPE_FOVEATION_PROFILE_CREATE_INFO_FB); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrFoveationProfileCreateInfoFB.nnext(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrFoveationProfileFB.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrFoveationProfileFB.java deleted file mode 100644 index f4d2d7e7..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrFoveationProfileFB.java +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.openxr; - -public class XrFoveationProfileFB extends DispatchableHandle { - public XrFoveationProfileFB(long handle, DispatchableHandle session) { - super(handle, session.getCapabilities()); - } - - public XrFoveationProfileFB(long handle, XRCapabilities capabilities) { - super(handle, capabilities); - } -} diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrFovf.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrFovf.java deleted file mode 100644 index 12ac9d9d..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrFovf.java +++ /dev/null @@ -1,307 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrFovf {
- *     float angleLeft;
- *     float angleRight;
- *     float angleUp;
- *     float angleDown;
- * }
- */ -public class XrFovf extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - ANGLELEFT, - ANGLERIGHT, - ANGLEUP, - ANGLEDOWN; - - static { - Layout layout = __struct( - __member(4), - __member(4), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - ANGLELEFT = layout.offsetof(0); - ANGLERIGHT = layout.offsetof(1); - ANGLEUP = layout.offsetof(2); - ANGLEDOWN = layout.offsetof(3); - } - - /** - * Creates a {@code XrFovf} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrFovf(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code angleLeft} field. */ - public float angleLeft() { return nangleLeft(address()); } - /** @return the value of the {@code angleRight} field. */ - public float angleRight() { return nangleRight(address()); } - /** @return the value of the {@code angleUp} field. */ - public float angleUp() { return nangleUp(address()); } - /** @return the value of the {@code angleDown} field. */ - public float angleDown() { return nangleDown(address()); } - - /** Sets the specified value to the {@code angleLeft} field. */ - public XrFovf angleLeft(float value) { nangleLeft(address(), value); return this; } - /** Sets the specified value to the {@code angleRight} field. */ - public XrFovf angleRight(float value) { nangleRight(address(), value); return this; } - /** Sets the specified value to the {@code angleUp} field. */ - public XrFovf angleUp(float value) { nangleUp(address(), value); return this; } - /** Sets the specified value to the {@code angleDown} field. */ - public XrFovf angleDown(float value) { nangleDown(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrFovf set( - float angleLeft, - float angleRight, - float angleUp, - float angleDown - ) { - angleLeft(angleLeft); - angleRight(angleRight); - angleUp(angleUp); - angleDown(angleDown); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrFovf set(XrFovf src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrFovf} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrFovf malloc() { - return wrap(XrFovf.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrFovf} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrFovf calloc() { - return wrap(XrFovf.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrFovf} instance allocated with {@link BufferUtils}. */ - public static XrFovf create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrFovf.class, memAddress(container), container); - } - - /** Returns a new {@code XrFovf} instance for the specified memory address. */ - public static XrFovf create(long address) { - return wrap(XrFovf.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrFovf createSafe(long address) { - return address == NULL ? null : wrap(XrFovf.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrFovf.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrFovf} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrFovf malloc(MemoryStack stack) { - return wrap(XrFovf.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrFovf} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrFovf calloc(MemoryStack stack) { - return wrap(XrFovf.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #angleLeft}. */ - public static float nangleLeft(long struct) { return UNSAFE.getFloat(null, struct + XrFovf.ANGLELEFT); } - /** Unsafe version of {@link #angleRight}. */ - public static float nangleRight(long struct) { return UNSAFE.getFloat(null, struct + XrFovf.ANGLERIGHT); } - /** Unsafe version of {@link #angleUp}. */ - public static float nangleUp(long struct) { return UNSAFE.getFloat(null, struct + XrFovf.ANGLEUP); } - /** Unsafe version of {@link #angleDown}. */ - public static float nangleDown(long struct) { return UNSAFE.getFloat(null, struct + XrFovf.ANGLEDOWN); } - - /** Unsafe version of {@link #angleLeft(float) angleLeft}. */ - public static void nangleLeft(long struct, float value) { UNSAFE.putFloat(null, struct + XrFovf.ANGLELEFT, value); } - /** Unsafe version of {@link #angleRight(float) angleRight}. */ - public static void nangleRight(long struct, float value) { UNSAFE.putFloat(null, struct + XrFovf.ANGLERIGHT, value); } - /** Unsafe version of {@link #angleUp(float) angleUp}. */ - public static void nangleUp(long struct, float value) { UNSAFE.putFloat(null, struct + XrFovf.ANGLEUP, value); } - /** Unsafe version of {@link #angleDown(float) angleDown}. */ - public static void nangleDown(long struct, float value) { UNSAFE.putFloat(null, struct + XrFovf.ANGLEDOWN, value); } - - // ----------------------------------- - - /** An array of {@link XrFovf} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrFovf ELEMENT_FACTORY = XrFovf.create(-1L); - - /** - * Creates a new {@code XrFovf.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrFovf#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrFovf getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code angleLeft} field. */ - public float angleLeft() { return XrFovf.nangleLeft(address()); } - /** @return the value of the {@code angleRight} field. */ - public float angleRight() { return XrFovf.nangleRight(address()); } - /** @return the value of the {@code angleUp} field. */ - public float angleUp() { return XrFovf.nangleUp(address()); } - /** @return the value of the {@code angleDown} field. */ - public float angleDown() { return XrFovf.nangleDown(address()); } - - /** Sets the specified value to the {@code angleLeft} field. */ - public Buffer angleLeft(float value) { XrFovf.nangleLeft(address(), value); return this; } - /** Sets the specified value to the {@code angleRight} field. */ - public Buffer angleRight(float value) { XrFovf.nangleRight(address(), value); return this; } - /** Sets the specified value to the {@code angleUp} field. */ - public Buffer angleUp(float value) { XrFovf.nangleUp(address(), value); return this; } - /** Sets the specified value to the {@code angleDown} field. */ - public Buffer angleDown(float value) { XrFovf.nangleDown(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrFrameBeginInfo.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrFrameBeginInfo.java deleted file mode 100644 index 1929460e..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrFrameBeginInfo.java +++ /dev/null @@ -1,279 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrFrameBeginInfo {
- *     XrStructureType type;
- *     void const * next;
- * }
- */ -public class XrFrameBeginInfo extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - } - - /** - * Creates a {@code XrFrameBeginInfo} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrFrameBeginInfo(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrFrameBeginInfo type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_FRAME_BEGIN_INFO TYPE_FRAME_BEGIN_INFO} value to the {@code type} field. */ - public XrFrameBeginInfo type$Default() { return type(XR10.XR_TYPE_FRAME_BEGIN_INFO); } - /** Sets the specified value to the {@code next} field. */ - public XrFrameBeginInfo next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrFrameBeginInfo set( - int type, - long next - ) { - type(type); - next(next); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrFrameBeginInfo set(XrFrameBeginInfo src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrFrameBeginInfo} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrFrameBeginInfo malloc() { - return wrap(XrFrameBeginInfo.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrFrameBeginInfo} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrFrameBeginInfo calloc() { - return wrap(XrFrameBeginInfo.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrFrameBeginInfo} instance allocated with {@link BufferUtils}. */ - public static XrFrameBeginInfo create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrFrameBeginInfo.class, memAddress(container), container); - } - - /** Returns a new {@code XrFrameBeginInfo} instance for the specified memory address. */ - public static XrFrameBeginInfo create(long address) { - return wrap(XrFrameBeginInfo.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrFrameBeginInfo createSafe(long address) { - return address == NULL ? null : wrap(XrFrameBeginInfo.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrFrameBeginInfo.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrFrameBeginInfo} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrFrameBeginInfo malloc(MemoryStack stack) { - return wrap(XrFrameBeginInfo.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrFrameBeginInfo} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrFrameBeginInfo calloc(MemoryStack stack) { - return wrap(XrFrameBeginInfo.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrFrameBeginInfo.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrFrameBeginInfo.NEXT); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrFrameBeginInfo.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrFrameBeginInfo.NEXT, value); } - - // ----------------------------------- - - /** An array of {@link XrFrameBeginInfo} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrFrameBeginInfo ELEMENT_FACTORY = XrFrameBeginInfo.create(-1L); - - /** - * Creates a new {@code XrFrameBeginInfo.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrFrameBeginInfo#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrFrameBeginInfo getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrFrameBeginInfo.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrFrameBeginInfo.nnext(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrFrameBeginInfo.ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_FRAME_BEGIN_INFO TYPE_FRAME_BEGIN_INFO} value to the {@code type} field. */ - public Buffer type$Default() { return type(XR10.XR_TYPE_FRAME_BEGIN_INFO); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrFrameBeginInfo.nnext(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrFrameEndInfo.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrFrameEndInfo.java deleted file mode 100644 index 6a50485f..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrFrameEndInfo.java +++ /dev/null @@ -1,362 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.PointerBuffer; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrFrameEndInfo {
- *     XrStructureType type;
- *     void const * next;
- *     XrTime displayTime;
- *     XrEnvironmentBlendMode environmentBlendMode;
- *     uint32_t layerCount;
- *     {@link XrCompositionLayerBaseHeader XrCompositionLayerBaseHeader} const * const * layers;
- * }
- */ -public class XrFrameEndInfo extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - DISPLAYTIME, - ENVIRONMENTBLENDMODE, - LAYERCOUNT, - LAYERS; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(8), - __member(4), - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - DISPLAYTIME = layout.offsetof(2); - ENVIRONMENTBLENDMODE = layout.offsetof(3); - LAYERCOUNT = layout.offsetof(4); - LAYERS = layout.offsetof(5); - } - - /** - * Creates a {@code XrFrameEndInfo} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrFrameEndInfo(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code displayTime} field. */ - @NativeType("XrTime") - public long displayTime() { return ndisplayTime(address()); } - /** @return the value of the {@code environmentBlendMode} field. */ - @NativeType("XrEnvironmentBlendMode") - public int environmentBlendMode() { return nenvironmentBlendMode(address()); } - /** @return the value of the {@code layerCount} field. */ - @NativeType("uint32_t") - public int layerCount() { return nlayerCount(address()); } - /** @return a {@link PointerBuffer} view of the data pointed to by the {@code layers} field. */ - @Nullable - @NativeType("XrCompositionLayerBaseHeader const * const *") - public PointerBuffer layers() { return nlayers(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrFrameEndInfo type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_FRAME_END_INFO TYPE_FRAME_END_INFO} value to the {@code type} field. */ - public XrFrameEndInfo type$Default() { return type(XR10.XR_TYPE_FRAME_END_INFO); } - /** Sets the specified value to the {@code next} field. */ - public XrFrameEndInfo next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code displayTime} field. */ - public XrFrameEndInfo displayTime(@NativeType("XrTime") long value) { ndisplayTime(address(), value); return this; } - /** Sets the specified value to the {@code environmentBlendMode} field. */ - public XrFrameEndInfo environmentBlendMode(@NativeType("XrEnvironmentBlendMode") int value) { nenvironmentBlendMode(address(), value); return this; } - /** Sets the specified value to the {@code layerCount} field. */ - public XrFrameEndInfo layerCount(@NativeType("uint32_t") int value) { nlayerCount(address(), value); return this; } - /** Sets the address of the specified {@link PointerBuffer} to the {@code layers} field. */ - public XrFrameEndInfo layers(@Nullable @NativeType("XrCompositionLayerBaseHeader const * const *") PointerBuffer value) { nlayers(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrFrameEndInfo set( - int type, - long next, - long displayTime, - int environmentBlendMode, - int layerCount, - @Nullable PointerBuffer layers - ) { - type(type); - next(next); - displayTime(displayTime); - environmentBlendMode(environmentBlendMode); - layerCount(layerCount); - layers(layers); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrFrameEndInfo set(XrFrameEndInfo src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrFrameEndInfo} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrFrameEndInfo malloc() { - return wrap(XrFrameEndInfo.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrFrameEndInfo} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrFrameEndInfo calloc() { - return wrap(XrFrameEndInfo.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrFrameEndInfo} instance allocated with {@link BufferUtils}. */ - public static XrFrameEndInfo create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrFrameEndInfo.class, memAddress(container), container); - } - - /** Returns a new {@code XrFrameEndInfo} instance for the specified memory address. */ - public static XrFrameEndInfo create(long address) { - return wrap(XrFrameEndInfo.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrFrameEndInfo createSafe(long address) { - return address == NULL ? null : wrap(XrFrameEndInfo.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrFrameEndInfo.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrFrameEndInfo} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrFrameEndInfo malloc(MemoryStack stack) { - return wrap(XrFrameEndInfo.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrFrameEndInfo} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrFrameEndInfo calloc(MemoryStack stack) { - return wrap(XrFrameEndInfo.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrFrameEndInfo.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrFrameEndInfo.NEXT); } - /** Unsafe version of {@link #displayTime}. */ - public static long ndisplayTime(long struct) { return UNSAFE.getLong(null, struct + XrFrameEndInfo.DISPLAYTIME); } - /** Unsafe version of {@link #environmentBlendMode}. */ - public static int nenvironmentBlendMode(long struct) { return UNSAFE.getInt(null, struct + XrFrameEndInfo.ENVIRONMENTBLENDMODE); } - /** Unsafe version of {@link #layerCount}. */ - public static int nlayerCount(long struct) { return UNSAFE.getInt(null, struct + XrFrameEndInfo.LAYERCOUNT); } - /** Unsafe version of {@link #layers() layers}. */ - @Nullable public static PointerBuffer nlayers(long struct) { return memPointerBufferSafe(memGetAddress(struct + XrFrameEndInfo.LAYERS), nlayerCount(struct)); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrFrameEndInfo.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrFrameEndInfo.NEXT, value); } - /** Unsafe version of {@link #displayTime(long) displayTime}. */ - public static void ndisplayTime(long struct, long value) { UNSAFE.putLong(null, struct + XrFrameEndInfo.DISPLAYTIME, value); } - /** Unsafe version of {@link #environmentBlendMode(int) environmentBlendMode}. */ - public static void nenvironmentBlendMode(long struct, int value) { UNSAFE.putInt(null, struct + XrFrameEndInfo.ENVIRONMENTBLENDMODE, value); } - /** Sets the specified value to the {@code layerCount} field of the specified {@code struct}. */ - public static void nlayerCount(long struct, int value) { UNSAFE.putInt(null, struct + XrFrameEndInfo.LAYERCOUNT, value); } - /** Unsafe version of {@link #layers(PointerBuffer) layers}. */ - public static void nlayers(long struct, @Nullable PointerBuffer value) { memPutAddress(struct + XrFrameEndInfo.LAYERS, memAddressSafe(value)); if (value != null) { nlayerCount(struct, value.remaining()); } } - - // ----------------------------------- - - /** An array of {@link XrFrameEndInfo} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrFrameEndInfo ELEMENT_FACTORY = XrFrameEndInfo.create(-1L); - - /** - * Creates a new {@code XrFrameEndInfo.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrFrameEndInfo#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrFrameEndInfo getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrFrameEndInfo.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrFrameEndInfo.nnext(address()); } - /** @return the value of the {@code displayTime} field. */ - @NativeType("XrTime") - public long displayTime() { return XrFrameEndInfo.ndisplayTime(address()); } - /** @return the value of the {@code environmentBlendMode} field. */ - @NativeType("XrEnvironmentBlendMode") - public int environmentBlendMode() { return XrFrameEndInfo.nenvironmentBlendMode(address()); } - /** @return the value of the {@code layerCount} field. */ - @NativeType("uint32_t") - public int layerCount() { return XrFrameEndInfo.nlayerCount(address()); } - /** @return a {@link PointerBuffer} view of the data pointed to by the {@code layers} field. */ - @Nullable - @NativeType("XrCompositionLayerBaseHeader const * const *") - public PointerBuffer layers() { return XrFrameEndInfo.nlayers(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrFrameEndInfo.ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_FRAME_END_INFO TYPE_FRAME_END_INFO} value to the {@code type} field. */ - public Buffer type$Default() { return type(XR10.XR_TYPE_FRAME_END_INFO); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrFrameEndInfo.nnext(address(), value); return this; } - /** Sets the specified value to the {@code displayTime} field. */ - public Buffer displayTime(@NativeType("XrTime") long value) { XrFrameEndInfo.ndisplayTime(address(), value); return this; } - /** Sets the specified value to the {@code environmentBlendMode} field. */ - public Buffer environmentBlendMode(@NativeType("XrEnvironmentBlendMode") int value) { XrFrameEndInfo.nenvironmentBlendMode(address(), value); return this; } - /** Sets the specified value to the {@code layerCount} field. */ - public Buffer layerCount(@NativeType("uint32_t") int value) { XrFrameEndInfo.nlayerCount(address(), value); return this; } - /** Sets the address of the specified {@link PointerBuffer} to the {@code layers} field. */ - public Buffer layers(@Nullable @NativeType("XrCompositionLayerBaseHeader const * const *") PointerBuffer value) { XrFrameEndInfo.nlayers(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrFrameState.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrFrameState.java deleted file mode 100644 index ca4d4b02..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrFrameState.java +++ /dev/null @@ -1,339 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrFrameState {
- *     XrStructureType type;
- *     void * next;
- *     XrTime predictedDisplayTime;
- *     XrDuration predictedDisplayPeriod;
- *     XrBool32 shouldRender;
- * }
- */ -public class XrFrameState extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - PREDICTEDDISPLAYTIME, - PREDICTEDDISPLAYPERIOD, - SHOULDRENDER; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(8), - __member(8), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - PREDICTEDDISPLAYTIME = layout.offsetof(2); - PREDICTEDDISPLAYPERIOD = layout.offsetof(3); - SHOULDRENDER = layout.offsetof(4); - } - - /** - * Creates a {@code XrFrameState} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrFrameState(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return the value of the {@code predictedDisplayTime} field. */ - @NativeType("XrTime") - public long predictedDisplayTime() { return npredictedDisplayTime(address()); } - /** @return the value of the {@code predictedDisplayPeriod} field. */ - @NativeType("XrDuration") - public long predictedDisplayPeriod() { return npredictedDisplayPeriod(address()); } - /** @return the value of the {@code shouldRender} field. */ - @NativeType("XrBool32") - public boolean shouldRender() { return nshouldRender(address()) != 0; } - - /** Sets the specified value to the {@code type} field. */ - public XrFrameState type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_FRAME_STATE TYPE_FRAME_STATE} value to the {@code type} field. */ - public XrFrameState type$Default() { return type(XR10.XR_TYPE_FRAME_STATE); } - /** Sets the specified value to the {@code next} field. */ - public XrFrameState next(@NativeType("void *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code predictedDisplayTime} field. */ - public XrFrameState predictedDisplayTime(@NativeType("XrTime") long value) { npredictedDisplayTime(address(), value); return this; } - /** Sets the specified value to the {@code predictedDisplayPeriod} field. */ - public XrFrameState predictedDisplayPeriod(@NativeType("XrDuration") long value) { npredictedDisplayPeriod(address(), value); return this; } - /** Sets the specified value to the {@code shouldRender} field. */ - public XrFrameState shouldRender(@NativeType("XrBool32") boolean value) { nshouldRender(address(), value ? 1 : 0); return this; } - - /** Initializes this struct with the specified values. */ - public XrFrameState set( - int type, - long next, - long predictedDisplayTime, - long predictedDisplayPeriod, - boolean shouldRender - ) { - type(type); - next(next); - predictedDisplayTime(predictedDisplayTime); - predictedDisplayPeriod(predictedDisplayPeriod); - shouldRender(shouldRender); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrFrameState set(XrFrameState src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrFrameState} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrFrameState malloc() { - return wrap(XrFrameState.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrFrameState} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrFrameState calloc() { - return wrap(XrFrameState.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrFrameState} instance allocated with {@link BufferUtils}. */ - public static XrFrameState create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrFrameState.class, memAddress(container), container); - } - - /** Returns a new {@code XrFrameState} instance for the specified memory address. */ - public static XrFrameState create(long address) { - return wrap(XrFrameState.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrFrameState createSafe(long address) { - return address == NULL ? null : wrap(XrFrameState.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrFrameState.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrFrameState} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrFrameState malloc(MemoryStack stack) { - return wrap(XrFrameState.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrFrameState} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrFrameState calloc(MemoryStack stack) { - return wrap(XrFrameState.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrFrameState.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrFrameState.NEXT); } - /** Unsafe version of {@link #predictedDisplayTime}. */ - public static long npredictedDisplayTime(long struct) { return UNSAFE.getLong(null, struct + XrFrameState.PREDICTEDDISPLAYTIME); } - /** Unsafe version of {@link #predictedDisplayPeriod}. */ - public static long npredictedDisplayPeriod(long struct) { return UNSAFE.getLong(null, struct + XrFrameState.PREDICTEDDISPLAYPERIOD); } - /** Unsafe version of {@link #shouldRender}. */ - public static int nshouldRender(long struct) { return UNSAFE.getInt(null, struct + XrFrameState.SHOULDRENDER); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrFrameState.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrFrameState.NEXT, value); } - /** Unsafe version of {@link #predictedDisplayTime(long) predictedDisplayTime}. */ - public static void npredictedDisplayTime(long struct, long value) { UNSAFE.putLong(null, struct + XrFrameState.PREDICTEDDISPLAYTIME, value); } - /** Unsafe version of {@link #predictedDisplayPeriod(long) predictedDisplayPeriod}. */ - public static void npredictedDisplayPeriod(long struct, long value) { UNSAFE.putLong(null, struct + XrFrameState.PREDICTEDDISPLAYPERIOD, value); } - /** Unsafe version of {@link #shouldRender(boolean) shouldRender}. */ - public static void nshouldRender(long struct, int value) { UNSAFE.putInt(null, struct + XrFrameState.SHOULDRENDER, value); } - - // ----------------------------------- - - /** An array of {@link XrFrameState} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrFrameState ELEMENT_FACTORY = XrFrameState.create(-1L); - - /** - * Creates a new {@code XrFrameState.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrFrameState#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrFrameState getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrFrameState.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrFrameState.nnext(address()); } - /** @return the value of the {@code predictedDisplayTime} field. */ - @NativeType("XrTime") - public long predictedDisplayTime() { return XrFrameState.npredictedDisplayTime(address()); } - /** @return the value of the {@code predictedDisplayPeriod} field. */ - @NativeType("XrDuration") - public long predictedDisplayPeriod() { return XrFrameState.npredictedDisplayPeriod(address()); } - /** @return the value of the {@code shouldRender} field. */ - @NativeType("XrBool32") - public boolean shouldRender() { return XrFrameState.nshouldRender(address()) != 0; } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrFrameState.ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_FRAME_STATE TYPE_FRAME_STATE} value to the {@code type} field. */ - public Buffer type$Default() { return type(XR10.XR_TYPE_FRAME_STATE); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrFrameState.nnext(address(), value); return this; } - /** Sets the specified value to the {@code predictedDisplayTime} field. */ - public Buffer predictedDisplayTime(@NativeType("XrTime") long value) { XrFrameState.npredictedDisplayTime(address(), value); return this; } - /** Sets the specified value to the {@code predictedDisplayPeriod} field. */ - public Buffer predictedDisplayPeriod(@NativeType("XrDuration") long value) { XrFrameState.npredictedDisplayPeriod(address(), value); return this; } - /** Sets the specified value to the {@code shouldRender} field. */ - public Buffer shouldRender(@NativeType("XrBool32") boolean value) { XrFrameState.nshouldRender(address(), value ? 1 : 0); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrFrameWaitInfo.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrFrameWaitInfo.java deleted file mode 100644 index 99ef4c7e..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrFrameWaitInfo.java +++ /dev/null @@ -1,279 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrFrameWaitInfo {
- *     XrStructureType type;
- *     void const * next;
- * }
- */ -public class XrFrameWaitInfo extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - } - - /** - * Creates a {@code XrFrameWaitInfo} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrFrameWaitInfo(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrFrameWaitInfo type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_FRAME_WAIT_INFO TYPE_FRAME_WAIT_INFO} value to the {@code type} field. */ - public XrFrameWaitInfo type$Default() { return type(XR10.XR_TYPE_FRAME_WAIT_INFO); } - /** Sets the specified value to the {@code next} field. */ - public XrFrameWaitInfo next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrFrameWaitInfo set( - int type, - long next - ) { - type(type); - next(next); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrFrameWaitInfo set(XrFrameWaitInfo src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrFrameWaitInfo} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrFrameWaitInfo malloc() { - return wrap(XrFrameWaitInfo.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrFrameWaitInfo} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrFrameWaitInfo calloc() { - return wrap(XrFrameWaitInfo.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrFrameWaitInfo} instance allocated with {@link BufferUtils}. */ - public static XrFrameWaitInfo create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrFrameWaitInfo.class, memAddress(container), container); - } - - /** Returns a new {@code XrFrameWaitInfo} instance for the specified memory address. */ - public static XrFrameWaitInfo create(long address) { - return wrap(XrFrameWaitInfo.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrFrameWaitInfo createSafe(long address) { - return address == NULL ? null : wrap(XrFrameWaitInfo.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrFrameWaitInfo.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrFrameWaitInfo} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrFrameWaitInfo malloc(MemoryStack stack) { - return wrap(XrFrameWaitInfo.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrFrameWaitInfo} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrFrameWaitInfo calloc(MemoryStack stack) { - return wrap(XrFrameWaitInfo.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrFrameWaitInfo.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrFrameWaitInfo.NEXT); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrFrameWaitInfo.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrFrameWaitInfo.NEXT, value); } - - // ----------------------------------- - - /** An array of {@link XrFrameWaitInfo} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrFrameWaitInfo ELEMENT_FACTORY = XrFrameWaitInfo.create(-1L); - - /** - * Creates a new {@code XrFrameWaitInfo.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrFrameWaitInfo#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrFrameWaitInfo getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrFrameWaitInfo.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrFrameWaitInfo.nnext(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrFrameWaitInfo.ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_FRAME_WAIT_INFO TYPE_FRAME_WAIT_INFO} value to the {@code type} field. */ - public Buffer type$Default() { return type(XR10.XR_TYPE_FRAME_WAIT_INFO); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrFrameWaitInfo.nnext(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrGeometryInstanceCreateInfoFB.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrGeometryInstanceCreateInfoFB.java deleted file mode 100644 index ad3e40c9..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrGeometryInstanceCreateInfoFB.java +++ /dev/null @@ -1,407 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrGeometryInstanceCreateInfoFB {
- *     XrStructureType type;
- *     void const * next;
- *     XrPassthroughLayerFB layer;
- *     XrTriangleMeshFB mesh;
- *     XrSpace baseSpace;
- *     {@link XrPosef XrPosef} pose;
- *     {@link XrVector3f XrVector3f} scale;
- * }
- */ -public class XrGeometryInstanceCreateInfoFB extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - LAYER, - MESH, - BASESPACE, - POSE, - SCALE; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(XrPosef.SIZEOF, XrPosef.ALIGNOF), - __member(XrVector3f.SIZEOF, XrVector3f.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - LAYER = layout.offsetof(2); - MESH = layout.offsetof(3); - BASESPACE = layout.offsetof(4); - POSE = layout.offsetof(5); - SCALE = layout.offsetof(6); - } - - /** - * Creates a {@code XrGeometryInstanceCreateInfoFB} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrGeometryInstanceCreateInfoFB(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code layer} field. */ - @NativeType("XrPassthroughLayerFB") - public long layer() { return nlayer(address()); } - /** @return the value of the {@code mesh} field. */ - @NativeType("XrTriangleMeshFB") - public long mesh() { return nmesh(address()); } - /** @return the value of the {@code baseSpace} field. */ - @NativeType("XrSpace") - public long baseSpace() { return nbaseSpace(address()); } - /** @return a {@link XrPosef} view of the {@code pose} field. */ - public XrPosef pose() { return npose(address()); } - /** @return a {@link XrVector3f} view of the {@code scale} field. */ - public XrVector3f scale() { return nscale(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrGeometryInstanceCreateInfoFB type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link FBPassthrough#XR_TYPE_GEOMETRY_INSTANCE_CREATE_INFO_FB TYPE_GEOMETRY_INSTANCE_CREATE_INFO_FB} value to the {@code type} field. */ - public XrGeometryInstanceCreateInfoFB type$Default() { return type(FBPassthrough.XR_TYPE_GEOMETRY_INSTANCE_CREATE_INFO_FB); } - /** Sets the specified value to the {@code next} field. */ - public XrGeometryInstanceCreateInfoFB next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code layer} field. */ - public XrGeometryInstanceCreateInfoFB layer(XrPassthroughLayerFB value) { nlayer(address(), value); return this; } - /** Sets the specified value to the {@code mesh} field. */ - public XrGeometryInstanceCreateInfoFB mesh(XrTriangleMeshFB value) { nmesh(address(), value); return this; } - /** Sets the specified value to the {@code baseSpace} field. */ - public XrGeometryInstanceCreateInfoFB baseSpace(XrSpace value) { nbaseSpace(address(), value); return this; } - /** Copies the specified {@link XrPosef} to the {@code pose} field. */ - public XrGeometryInstanceCreateInfoFB pose(XrPosef value) { npose(address(), value); return this; } - /** Passes the {@code pose} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrGeometryInstanceCreateInfoFB pose(java.util.function.Consumer consumer) { consumer.accept(pose()); return this; } - /** Copies the specified {@link XrVector3f} to the {@code scale} field. */ - public XrGeometryInstanceCreateInfoFB scale(XrVector3f value) { nscale(address(), value); return this; } - /** Passes the {@code scale} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrGeometryInstanceCreateInfoFB scale(java.util.function.Consumer consumer) { consumer.accept(scale()); return this; } - - /** Initializes this struct with the specified values. */ - public XrGeometryInstanceCreateInfoFB set( - int type, - long next, - XrPassthroughLayerFB layer, - XrTriangleMeshFB mesh, - XrSpace baseSpace, - XrPosef pose, - XrVector3f scale - ) { - type(type); - next(next); - layer(layer); - mesh(mesh); - baseSpace(baseSpace); - pose(pose); - scale(scale); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrGeometryInstanceCreateInfoFB set(XrGeometryInstanceCreateInfoFB src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrGeometryInstanceCreateInfoFB} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrGeometryInstanceCreateInfoFB malloc() { - return wrap(XrGeometryInstanceCreateInfoFB.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrGeometryInstanceCreateInfoFB} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrGeometryInstanceCreateInfoFB calloc() { - return wrap(XrGeometryInstanceCreateInfoFB.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrGeometryInstanceCreateInfoFB} instance allocated with {@link BufferUtils}. */ - public static XrGeometryInstanceCreateInfoFB create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrGeometryInstanceCreateInfoFB.class, memAddress(container), container); - } - - /** Returns a new {@code XrGeometryInstanceCreateInfoFB} instance for the specified memory address. */ - public static XrGeometryInstanceCreateInfoFB create(long address) { - return wrap(XrGeometryInstanceCreateInfoFB.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrGeometryInstanceCreateInfoFB createSafe(long address) { - return address == NULL ? null : wrap(XrGeometryInstanceCreateInfoFB.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrGeometryInstanceCreateInfoFB.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrGeometryInstanceCreateInfoFB} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrGeometryInstanceCreateInfoFB malloc(MemoryStack stack) { - return wrap(XrGeometryInstanceCreateInfoFB.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrGeometryInstanceCreateInfoFB} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrGeometryInstanceCreateInfoFB calloc(MemoryStack stack) { - return wrap(XrGeometryInstanceCreateInfoFB.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrGeometryInstanceCreateInfoFB.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrGeometryInstanceCreateInfoFB.NEXT); } - /** Unsafe version of {@link #layer}. */ - public static long nlayer(long struct) { return memGetAddress(struct + XrGeometryInstanceCreateInfoFB.LAYER); } - /** Unsafe version of {@link #mesh}. */ - public static long nmesh(long struct) { return memGetAddress(struct + XrGeometryInstanceCreateInfoFB.MESH); } - /** Unsafe version of {@link #baseSpace}. */ - public static long nbaseSpace(long struct) { return memGetAddress(struct + XrGeometryInstanceCreateInfoFB.BASESPACE); } - /** Unsafe version of {@link #pose}. */ - public static XrPosef npose(long struct) { return XrPosef.create(struct + XrGeometryInstanceCreateInfoFB.POSE); } - /** Unsafe version of {@link #scale}. */ - public static XrVector3f nscale(long struct) { return XrVector3f.create(struct + XrGeometryInstanceCreateInfoFB.SCALE); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrGeometryInstanceCreateInfoFB.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrGeometryInstanceCreateInfoFB.NEXT, value); } - /** Unsafe version of {@link #layer(XrPassthroughLayerFB) layer}. */ - public static void nlayer(long struct, XrPassthroughLayerFB value) { memPutAddress(struct + XrGeometryInstanceCreateInfoFB.LAYER, value.address()); } - /** Unsafe version of {@link #mesh(XrTriangleMeshFB) mesh}. */ - public static void nmesh(long struct, XrTriangleMeshFB value) { memPutAddress(struct + XrGeometryInstanceCreateInfoFB.MESH, value.address()); } - /** Unsafe version of {@link #baseSpace(XrSpace) baseSpace}. */ - public static void nbaseSpace(long struct, XrSpace value) { memPutAddress(struct + XrGeometryInstanceCreateInfoFB.BASESPACE, value.address()); } - /** Unsafe version of {@link #pose(XrPosef) pose}. */ - public static void npose(long struct, XrPosef value) { memCopy(value.address(), struct + XrGeometryInstanceCreateInfoFB.POSE, XrPosef.SIZEOF); } - /** Unsafe version of {@link #scale(XrVector3f) scale}. */ - public static void nscale(long struct, XrVector3f value) { memCopy(value.address(), struct + XrGeometryInstanceCreateInfoFB.SCALE, XrVector3f.SIZEOF); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XrGeometryInstanceCreateInfoFB.LAYER)); - check(memGetAddress(struct + XrGeometryInstanceCreateInfoFB.MESH)); - check(memGetAddress(struct + XrGeometryInstanceCreateInfoFB.BASESPACE)); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrGeometryInstanceCreateInfoFB} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrGeometryInstanceCreateInfoFB ELEMENT_FACTORY = XrGeometryInstanceCreateInfoFB.create(-1L); - - /** - * Creates a new {@code XrGeometryInstanceCreateInfoFB.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrGeometryInstanceCreateInfoFB#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrGeometryInstanceCreateInfoFB getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrGeometryInstanceCreateInfoFB.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrGeometryInstanceCreateInfoFB.nnext(address()); } - /** @return the value of the {@code layer} field. */ - @NativeType("XrPassthroughLayerFB") - public long layer() { return XrGeometryInstanceCreateInfoFB.nlayer(address()); } - /** @return the value of the {@code mesh} field. */ - @NativeType("XrTriangleMeshFB") - public long mesh() { return XrGeometryInstanceCreateInfoFB.nmesh(address()); } - /** @return the value of the {@code baseSpace} field. */ - @NativeType("XrSpace") - public long baseSpace() { return XrGeometryInstanceCreateInfoFB.nbaseSpace(address()); } - /** @return a {@link XrPosef} view of the {@code pose} field. */ - public XrPosef pose() { return XrGeometryInstanceCreateInfoFB.npose(address()); } - /** @return a {@link XrVector3f} view of the {@code scale} field. */ - public XrVector3f scale() { return XrGeometryInstanceCreateInfoFB.nscale(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrGeometryInstanceCreateInfoFB.ntype(address(), value); return this; } - /** Sets the {@link FBPassthrough#XR_TYPE_GEOMETRY_INSTANCE_CREATE_INFO_FB TYPE_GEOMETRY_INSTANCE_CREATE_INFO_FB} value to the {@code type} field. */ - public Buffer type$Default() { return type(FBPassthrough.XR_TYPE_GEOMETRY_INSTANCE_CREATE_INFO_FB); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrGeometryInstanceCreateInfoFB.nnext(address(), value); return this; } - /** Sets the specified value to the {@code layer} field. */ - public Buffer layer(XrPassthroughLayerFB value) { XrGeometryInstanceCreateInfoFB.nlayer(address(), value); return this; } - /** Sets the specified value to the {@code mesh} field. */ - public Buffer mesh(XrTriangleMeshFB value) { XrGeometryInstanceCreateInfoFB.nmesh(address(), value); return this; } - /** Sets the specified value to the {@code baseSpace} field. */ - public Buffer baseSpace(XrSpace value) { XrGeometryInstanceCreateInfoFB.nbaseSpace(address(), value); return this; } - /** Copies the specified {@link XrPosef} to the {@code pose} field. */ - public Buffer pose(XrPosef value) { XrGeometryInstanceCreateInfoFB.npose(address(), value); return this; } - /** Passes the {@code pose} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer pose(java.util.function.Consumer consumer) { consumer.accept(pose()); return this; } - /** Copies the specified {@link XrVector3f} to the {@code scale} field. */ - public Buffer scale(XrVector3f value) { XrGeometryInstanceCreateInfoFB.nscale(address(), value); return this; } - /** Passes the {@code scale} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer scale(java.util.function.Consumer consumer) { consumer.accept(scale()); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrGeometryInstanceFB.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrGeometryInstanceFB.java deleted file mode 100644 index 0b41b56f..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrGeometryInstanceFB.java +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.openxr; - -public class XrGeometryInstanceFB extends DispatchableHandle { - public XrGeometryInstanceFB(long handle, DispatchableHandle session) { - super(handle, session.getCapabilities()); - } - - public XrGeometryInstanceFB(long handle, XRCapabilities capabilities) { - super(handle, capabilities); - } -} diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrGeometryInstanceTransformFB.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrGeometryInstanceTransformFB.java deleted file mode 100644 index 09f6f8f1..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrGeometryInstanceTransformFB.java +++ /dev/null @@ -1,385 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrGeometryInstanceTransformFB {
- *     XrStructureType type;
- *     void const * next;
- *     XrSpace baseSpace;
- *     XrTime time;
- *     {@link XrPosef XrPosef} pose;
- *     {@link XrVector3f XrVector3f} scale;
- * }
- */ -public class XrGeometryInstanceTransformFB extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - BASESPACE, - TIME, - POSE, - SCALE; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(8), - __member(XrPosef.SIZEOF, XrPosef.ALIGNOF), - __member(XrVector3f.SIZEOF, XrVector3f.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - BASESPACE = layout.offsetof(2); - TIME = layout.offsetof(3); - POSE = layout.offsetof(4); - SCALE = layout.offsetof(5); - } - - /** - * Creates a {@code XrGeometryInstanceTransformFB} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrGeometryInstanceTransformFB(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code baseSpace} field. */ - @NativeType("XrSpace") - public long baseSpace() { return nbaseSpace(address()); } - /** @return the value of the {@code time} field. */ - @NativeType("XrTime") - public long time() { return ntime(address()); } - /** @return a {@link XrPosef} view of the {@code pose} field. */ - public XrPosef pose() { return npose(address()); } - /** @return a {@link XrVector3f} view of the {@code scale} field. */ - public XrVector3f scale() { return nscale(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrGeometryInstanceTransformFB type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link FBPassthrough#XR_TYPE_GEOMETRY_INSTANCE_TRANSFORM_FB TYPE_GEOMETRY_INSTANCE_TRANSFORM_FB} value to the {@code type} field. */ - public XrGeometryInstanceTransformFB type$Default() { return type(FBPassthrough.XR_TYPE_GEOMETRY_INSTANCE_TRANSFORM_FB); } - /** Sets the specified value to the {@code next} field. */ - public XrGeometryInstanceTransformFB next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code baseSpace} field. */ - public XrGeometryInstanceTransformFB baseSpace(XrSpace value) { nbaseSpace(address(), value); return this; } - /** Sets the specified value to the {@code time} field. */ - public XrGeometryInstanceTransformFB time(@NativeType("XrTime") long value) { ntime(address(), value); return this; } - /** Copies the specified {@link XrPosef} to the {@code pose} field. */ - public XrGeometryInstanceTransformFB pose(XrPosef value) { npose(address(), value); return this; } - /** Passes the {@code pose} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrGeometryInstanceTransformFB pose(java.util.function.Consumer consumer) { consumer.accept(pose()); return this; } - /** Copies the specified {@link XrVector3f} to the {@code scale} field. */ - public XrGeometryInstanceTransformFB scale(XrVector3f value) { nscale(address(), value); return this; } - /** Passes the {@code scale} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrGeometryInstanceTransformFB scale(java.util.function.Consumer consumer) { consumer.accept(scale()); return this; } - - /** Initializes this struct with the specified values. */ - public XrGeometryInstanceTransformFB set( - int type, - long next, - XrSpace baseSpace, - long time, - XrPosef pose, - XrVector3f scale - ) { - type(type); - next(next); - baseSpace(baseSpace); - time(time); - pose(pose); - scale(scale); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrGeometryInstanceTransformFB set(XrGeometryInstanceTransformFB src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrGeometryInstanceTransformFB} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrGeometryInstanceTransformFB malloc() { - return wrap(XrGeometryInstanceTransformFB.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrGeometryInstanceTransformFB} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrGeometryInstanceTransformFB calloc() { - return wrap(XrGeometryInstanceTransformFB.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrGeometryInstanceTransformFB} instance allocated with {@link BufferUtils}. */ - public static XrGeometryInstanceTransformFB create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrGeometryInstanceTransformFB.class, memAddress(container), container); - } - - /** Returns a new {@code XrGeometryInstanceTransformFB} instance for the specified memory address. */ - public static XrGeometryInstanceTransformFB create(long address) { - return wrap(XrGeometryInstanceTransformFB.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrGeometryInstanceTransformFB createSafe(long address) { - return address == NULL ? null : wrap(XrGeometryInstanceTransformFB.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrGeometryInstanceTransformFB.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrGeometryInstanceTransformFB} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrGeometryInstanceTransformFB malloc(MemoryStack stack) { - return wrap(XrGeometryInstanceTransformFB.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrGeometryInstanceTransformFB} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrGeometryInstanceTransformFB calloc(MemoryStack stack) { - return wrap(XrGeometryInstanceTransformFB.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrGeometryInstanceTransformFB.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrGeometryInstanceTransformFB.NEXT); } - /** Unsafe version of {@link #baseSpace}. */ - public static long nbaseSpace(long struct) { return memGetAddress(struct + XrGeometryInstanceTransformFB.BASESPACE); } - /** Unsafe version of {@link #time}. */ - public static long ntime(long struct) { return UNSAFE.getLong(null, struct + XrGeometryInstanceTransformFB.TIME); } - /** Unsafe version of {@link #pose}. */ - public static XrPosef npose(long struct) { return XrPosef.create(struct + XrGeometryInstanceTransformFB.POSE); } - /** Unsafe version of {@link #scale}. */ - public static XrVector3f nscale(long struct) { return XrVector3f.create(struct + XrGeometryInstanceTransformFB.SCALE); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrGeometryInstanceTransformFB.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrGeometryInstanceTransformFB.NEXT, value); } - /** Unsafe version of {@link #baseSpace(XrSpace) baseSpace}. */ - public static void nbaseSpace(long struct, XrSpace value) { memPutAddress(struct + XrGeometryInstanceTransformFB.BASESPACE, value.address()); } - /** Unsafe version of {@link #time(long) time}. */ - public static void ntime(long struct, long value) { UNSAFE.putLong(null, struct + XrGeometryInstanceTransformFB.TIME, value); } - /** Unsafe version of {@link #pose(XrPosef) pose}. */ - public static void npose(long struct, XrPosef value) { memCopy(value.address(), struct + XrGeometryInstanceTransformFB.POSE, XrPosef.SIZEOF); } - /** Unsafe version of {@link #scale(XrVector3f) scale}. */ - public static void nscale(long struct, XrVector3f value) { memCopy(value.address(), struct + XrGeometryInstanceTransformFB.SCALE, XrVector3f.SIZEOF); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XrGeometryInstanceTransformFB.BASESPACE)); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrGeometryInstanceTransformFB} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrGeometryInstanceTransformFB ELEMENT_FACTORY = XrGeometryInstanceTransformFB.create(-1L); - - /** - * Creates a new {@code XrGeometryInstanceTransformFB.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrGeometryInstanceTransformFB#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrGeometryInstanceTransformFB getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrGeometryInstanceTransformFB.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrGeometryInstanceTransformFB.nnext(address()); } - /** @return the value of the {@code baseSpace} field. */ - @NativeType("XrSpace") - public long baseSpace() { return XrGeometryInstanceTransformFB.nbaseSpace(address()); } - /** @return the value of the {@code time} field. */ - @NativeType("XrTime") - public long time() { return XrGeometryInstanceTransformFB.ntime(address()); } - /** @return a {@link XrPosef} view of the {@code pose} field. */ - public XrPosef pose() { return XrGeometryInstanceTransformFB.npose(address()); } - /** @return a {@link XrVector3f} view of the {@code scale} field. */ - public XrVector3f scale() { return XrGeometryInstanceTransformFB.nscale(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrGeometryInstanceTransformFB.ntype(address(), value); return this; } - /** Sets the {@link FBPassthrough#XR_TYPE_GEOMETRY_INSTANCE_TRANSFORM_FB TYPE_GEOMETRY_INSTANCE_TRANSFORM_FB} value to the {@code type} field. */ - public Buffer type$Default() { return type(FBPassthrough.XR_TYPE_GEOMETRY_INSTANCE_TRANSFORM_FB); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrGeometryInstanceTransformFB.nnext(address(), value); return this; } - /** Sets the specified value to the {@code baseSpace} field. */ - public Buffer baseSpace(XrSpace value) { XrGeometryInstanceTransformFB.nbaseSpace(address(), value); return this; } - /** Sets the specified value to the {@code time} field. */ - public Buffer time(@NativeType("XrTime") long value) { XrGeometryInstanceTransformFB.ntime(address(), value); return this; } - /** Copies the specified {@link XrPosef} to the {@code pose} field. */ - public Buffer pose(XrPosef value) { XrGeometryInstanceTransformFB.npose(address(), value); return this; } - /** Passes the {@code pose} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer pose(java.util.function.Consumer consumer) { consumer.accept(pose()); return this; } - /** Copies the specified {@link XrVector3f} to the {@code scale} field. */ - public Buffer scale(XrVector3f value) { XrGeometryInstanceTransformFB.nscale(address(), value); return this; } - /** Passes the {@code scale} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer scale(java.util.function.Consumer consumer) { consumer.accept(scale()); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrGraphicsBindingEGLMNDX.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrGraphicsBindingEGLMNDX.java deleted file mode 100644 index a9c44caa..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrGraphicsBindingEGLMNDX.java +++ /dev/null @@ -1,384 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrGraphicsBindingEGLMNDX {
- *     XrStructureType type;
- *     void const * next;
- *     PFNEGLGETPROCADDRESSPROC getProcAddress;
- *     EGLDisplay display;
- *     EGLConfig config;
- *     EGLContext context;
- * }
- */ -public class XrGraphicsBindingEGLMNDX extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - GETPROCADDRESS, - DISPLAY, - CONFIG, - CONTEXT; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - GETPROCADDRESS = layout.offsetof(2); - DISPLAY = layout.offsetof(3); - CONFIG = layout.offsetof(4); - CONTEXT = layout.offsetof(5); - } - - /** - * Creates a {@code XrGraphicsBindingEGLMNDX} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrGraphicsBindingEGLMNDX(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code getProcAddress} field. */ - @NativeType("PFNEGLGETPROCADDRESSPROC") - public long getProcAddress() { return ngetProcAddress(address()); } - /** @return the value of the {@code display} field. */ - @NativeType("EGLDisplay") - public long display() { return ndisplay(address()); } - /** @return the value of the {@code config} field. */ - @NativeType("EGLConfig") - public long config() { return nconfig(address()); } - /** @return the value of the {@code context} field. */ - @NativeType("EGLContext") - public long context() { return ncontext(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrGraphicsBindingEGLMNDX type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link MNDXEglEnable#XR_TYPE_GRAPHICS_BINDING_EGL_MNDX TYPE_GRAPHICS_BINDING_EGL_MNDX} value to the {@code type} field. */ - public XrGraphicsBindingEGLMNDX type$Default() { return type(MNDXEglEnable.XR_TYPE_GRAPHICS_BINDING_EGL_MNDX); } - /** Sets the specified value to the {@code next} field. */ - public XrGraphicsBindingEGLMNDX next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code getProcAddress} field. */ - public XrGraphicsBindingEGLMNDX getProcAddress(@NativeType("PFNEGLGETPROCADDRESSPROC") long value) { ngetProcAddress(address(), value); return this; } - /** Sets the specified value to the {@code display} field. */ - public XrGraphicsBindingEGLMNDX display(@NativeType("EGLDisplay") long value) { ndisplay(address(), value); return this; } - /** Sets the specified value to the {@code config} field. */ - public XrGraphicsBindingEGLMNDX config(@NativeType("EGLConfig") long value) { nconfig(address(), value); return this; } - /** Sets the specified value to the {@code context} field. */ - public XrGraphicsBindingEGLMNDX context(@NativeType("EGLContext") long value) { ncontext(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrGraphicsBindingEGLMNDX set( - int type, - long next, - long getProcAddress, - long display, - long config, - long context - ) { - type(type); - next(next); - getProcAddress(getProcAddress); - display(display); - config(config); - context(context); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrGraphicsBindingEGLMNDX set(XrGraphicsBindingEGLMNDX src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrGraphicsBindingEGLMNDX} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrGraphicsBindingEGLMNDX malloc() { - return wrap(XrGraphicsBindingEGLMNDX.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrGraphicsBindingEGLMNDX} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrGraphicsBindingEGLMNDX calloc() { - return wrap(XrGraphicsBindingEGLMNDX.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrGraphicsBindingEGLMNDX} instance allocated with {@link BufferUtils}. */ - public static XrGraphicsBindingEGLMNDX create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrGraphicsBindingEGLMNDX.class, memAddress(container), container); - } - - /** Returns a new {@code XrGraphicsBindingEGLMNDX} instance for the specified memory address. */ - public static XrGraphicsBindingEGLMNDX create(long address) { - return wrap(XrGraphicsBindingEGLMNDX.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrGraphicsBindingEGLMNDX createSafe(long address) { - return address == NULL ? null : wrap(XrGraphicsBindingEGLMNDX.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrGraphicsBindingEGLMNDX.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrGraphicsBindingEGLMNDX} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrGraphicsBindingEGLMNDX malloc(MemoryStack stack) { - return wrap(XrGraphicsBindingEGLMNDX.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrGraphicsBindingEGLMNDX} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrGraphicsBindingEGLMNDX calloc(MemoryStack stack) { - return wrap(XrGraphicsBindingEGLMNDX.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrGraphicsBindingEGLMNDX.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrGraphicsBindingEGLMNDX.NEXT); } - /** Unsafe version of {@link #getProcAddress}. */ - public static long ngetProcAddress(long struct) { return memGetAddress(struct + XrGraphicsBindingEGLMNDX.GETPROCADDRESS); } - /** Unsafe version of {@link #display}. */ - public static long ndisplay(long struct) { return memGetAddress(struct + XrGraphicsBindingEGLMNDX.DISPLAY); } - /** Unsafe version of {@link #config}. */ - public static long nconfig(long struct) { return memGetAddress(struct + XrGraphicsBindingEGLMNDX.CONFIG); } - /** Unsafe version of {@link #context}. */ - public static long ncontext(long struct) { return memGetAddress(struct + XrGraphicsBindingEGLMNDX.CONTEXT); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrGraphicsBindingEGLMNDX.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrGraphicsBindingEGLMNDX.NEXT, value); } - /** Unsafe version of {@link #getProcAddress(long) getProcAddress}. */ - public static void ngetProcAddress(long struct, long value) { memPutAddress(struct + XrGraphicsBindingEGLMNDX.GETPROCADDRESS, check(value)); } - /** Unsafe version of {@link #display(long) display}. */ - public static void ndisplay(long struct, long value) { memPutAddress(struct + XrGraphicsBindingEGLMNDX.DISPLAY, check(value)); } - /** Unsafe version of {@link #config(long) config}. */ - public static void nconfig(long struct, long value) { memPutAddress(struct + XrGraphicsBindingEGLMNDX.CONFIG, check(value)); } - /** Unsafe version of {@link #context(long) context}. */ - public static void ncontext(long struct, long value) { memPutAddress(struct + XrGraphicsBindingEGLMNDX.CONTEXT, check(value)); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XrGraphicsBindingEGLMNDX.GETPROCADDRESS)); - check(memGetAddress(struct + XrGraphicsBindingEGLMNDX.DISPLAY)); - check(memGetAddress(struct + XrGraphicsBindingEGLMNDX.CONFIG)); - check(memGetAddress(struct + XrGraphicsBindingEGLMNDX.CONTEXT)); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrGraphicsBindingEGLMNDX} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrGraphicsBindingEGLMNDX ELEMENT_FACTORY = XrGraphicsBindingEGLMNDX.create(-1L); - - /** - * Creates a new {@code XrGraphicsBindingEGLMNDX.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrGraphicsBindingEGLMNDX#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrGraphicsBindingEGLMNDX getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrGraphicsBindingEGLMNDX.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrGraphicsBindingEGLMNDX.nnext(address()); } - /** @return the value of the {@code getProcAddress} field. */ - @NativeType("PFNEGLGETPROCADDRESSPROC") - public long getProcAddress() { return XrGraphicsBindingEGLMNDX.ngetProcAddress(address()); } - /** @return the value of the {@code display} field. */ - @NativeType("EGLDisplay") - public long display() { return XrGraphicsBindingEGLMNDX.ndisplay(address()); } - /** @return the value of the {@code config} field. */ - @NativeType("EGLConfig") - public long config() { return XrGraphicsBindingEGLMNDX.nconfig(address()); } - /** @return the value of the {@code context} field. */ - @NativeType("EGLContext") - public long context() { return XrGraphicsBindingEGLMNDX.ncontext(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrGraphicsBindingEGLMNDX.ntype(address(), value); return this; } - /** Sets the {@link MNDXEglEnable#XR_TYPE_GRAPHICS_BINDING_EGL_MNDX TYPE_GRAPHICS_BINDING_EGL_MNDX} value to the {@code type} field. */ - public Buffer type$Default() { return type(MNDXEglEnable.XR_TYPE_GRAPHICS_BINDING_EGL_MNDX); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrGraphicsBindingEGLMNDX.nnext(address(), value); return this; } - /** Sets the specified value to the {@code getProcAddress} field. */ - public Buffer getProcAddress(@NativeType("PFNEGLGETPROCADDRESSPROC") long value) { XrGraphicsBindingEGLMNDX.ngetProcAddress(address(), value); return this; } - /** Sets the specified value to the {@code display} field. */ - public Buffer display(@NativeType("EGLDisplay") long value) { XrGraphicsBindingEGLMNDX.ndisplay(address(), value); return this; } - /** Sets the specified value to the {@code config} field. */ - public Buffer config(@NativeType("EGLConfig") long value) { XrGraphicsBindingEGLMNDX.nconfig(address(), value); return this; } - /** Sets the specified value to the {@code context} field. */ - public Buffer context(@NativeType("EGLContext") long value) { XrGraphicsBindingEGLMNDX.ncontext(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrGraphicsBindingOpenGLESAndroidKHR.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrGraphicsBindingOpenGLESAndroidKHR.java deleted file mode 100644 index 7a22430b..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrGraphicsBindingOpenGLESAndroidKHR.java +++ /dev/null @@ -1,363 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrGraphicsBindingOpenGLESAndroidKHR {
- *     XrStructureType type;
- *     void const * next;
- *     EGLDisplay display;
- *     EGLConfig config;
- *     EGLContext context;
- * }
- */ -public class XrGraphicsBindingOpenGLESAndroidKHR extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - DISPLAY, - CONFIG, - CONTEXT; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - DISPLAY = layout.offsetof(2); - CONFIG = layout.offsetof(3); - CONTEXT = layout.offsetof(4); - } - - /** - * Creates a {@code XrGraphicsBindingOpenGLESAndroidKHR} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrGraphicsBindingOpenGLESAndroidKHR(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code display} field. */ - @NativeType("EGLDisplay") - public long display() { return ndisplay(address()); } - /** @return the value of the {@code config} field. */ - @NativeType("EGLConfig") - public long config() { return nconfig(address()); } - /** @return the value of the {@code context} field. */ - @NativeType("EGLContext") - public long context() { return ncontext(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrGraphicsBindingOpenGLESAndroidKHR type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link KHROpenglEsEnable#XR_TYPE_GRAPHICS_BINDING_OPENGL_ES_ANDROID_KHR TYPE_GRAPHICS_BINDING_OPENGL_ES_ANDROID_KHR} value to the {@code type} field. */ - public XrGraphicsBindingOpenGLESAndroidKHR type$Default() { return type(KHROpenglEsEnable.XR_TYPE_GRAPHICS_BINDING_OPENGL_ES_ANDROID_KHR); } - /** Sets the specified value to the {@code next} field. */ - public XrGraphicsBindingOpenGLESAndroidKHR next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code display} field. */ - public XrGraphicsBindingOpenGLESAndroidKHR display(@NativeType("EGLDisplay") long value) { ndisplay(address(), value); return this; } - /** Sets the specified value to the {@code config} field. */ - public XrGraphicsBindingOpenGLESAndroidKHR config(@NativeType("EGLConfig") long value) { nconfig(address(), value); return this; } - /** Sets the specified value to the {@code context} field. */ - public XrGraphicsBindingOpenGLESAndroidKHR context(@NativeType("EGLContext") long value) { ncontext(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrGraphicsBindingOpenGLESAndroidKHR set( - int type, - long next, - long display, - long config, - long context - ) { - type(type); - next(next); - display(display); - config(config); - context(context); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrGraphicsBindingOpenGLESAndroidKHR set(XrGraphicsBindingOpenGLESAndroidKHR src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrGraphicsBindingOpenGLESAndroidKHR} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrGraphicsBindingOpenGLESAndroidKHR malloc() { - return wrap(XrGraphicsBindingOpenGLESAndroidKHR.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrGraphicsBindingOpenGLESAndroidKHR} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrGraphicsBindingOpenGLESAndroidKHR calloc() { - return wrap(XrGraphicsBindingOpenGLESAndroidKHR.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrGraphicsBindingOpenGLESAndroidKHR} instance allocated with {@link BufferUtils}. */ - public static XrGraphicsBindingOpenGLESAndroidKHR create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrGraphicsBindingOpenGLESAndroidKHR.class, memAddress(container), container); - } - - /** Returns a new {@code XrGraphicsBindingOpenGLESAndroidKHR} instance for the specified memory address. */ - public static XrGraphicsBindingOpenGLESAndroidKHR create(long address) { - return wrap(XrGraphicsBindingOpenGLESAndroidKHR.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrGraphicsBindingOpenGLESAndroidKHR createSafe(long address) { - return address == NULL ? null : wrap(XrGraphicsBindingOpenGLESAndroidKHR.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrGraphicsBindingOpenGLESAndroidKHR.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrGraphicsBindingOpenGLESAndroidKHR} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrGraphicsBindingOpenGLESAndroidKHR malloc(MemoryStack stack) { - return wrap(XrGraphicsBindingOpenGLESAndroidKHR.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrGraphicsBindingOpenGLESAndroidKHR} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrGraphicsBindingOpenGLESAndroidKHR calloc(MemoryStack stack) { - return wrap(XrGraphicsBindingOpenGLESAndroidKHR.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrGraphicsBindingOpenGLESAndroidKHR.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrGraphicsBindingOpenGLESAndroidKHR.NEXT); } - /** Unsafe version of {@link #display}. */ - public static long ndisplay(long struct) { return memGetAddress(struct + XrGraphicsBindingOpenGLESAndroidKHR.DISPLAY); } - /** Unsafe version of {@link #config}. */ - public static long nconfig(long struct) { return memGetAddress(struct + XrGraphicsBindingOpenGLESAndroidKHR.CONFIG); } - /** Unsafe version of {@link #context}. */ - public static long ncontext(long struct) { return memGetAddress(struct + XrGraphicsBindingOpenGLESAndroidKHR.CONTEXT); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrGraphicsBindingOpenGLESAndroidKHR.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrGraphicsBindingOpenGLESAndroidKHR.NEXT, value); } - /** Unsafe version of {@link #display(long) display}. */ - public static void ndisplay(long struct, long value) { memPutAddress(struct + XrGraphicsBindingOpenGLESAndroidKHR.DISPLAY, check(value)); } - /** Unsafe version of {@link #config(long) config}. */ - public static void nconfig(long struct, long value) { memPutAddress(struct + XrGraphicsBindingOpenGLESAndroidKHR.CONFIG, check(value)); } - /** Unsafe version of {@link #context(long) context}. */ - public static void ncontext(long struct, long value) { memPutAddress(struct + XrGraphicsBindingOpenGLESAndroidKHR.CONTEXT, check(value)); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XrGraphicsBindingOpenGLESAndroidKHR.DISPLAY)); - check(memGetAddress(struct + XrGraphicsBindingOpenGLESAndroidKHR.CONFIG)); - check(memGetAddress(struct + XrGraphicsBindingOpenGLESAndroidKHR.CONTEXT)); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrGraphicsBindingOpenGLESAndroidKHR} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrGraphicsBindingOpenGLESAndroidKHR ELEMENT_FACTORY = XrGraphicsBindingOpenGLESAndroidKHR.create(-1L); - - /** - * Creates a new {@code XrGraphicsBindingOpenGLESAndroidKHR.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrGraphicsBindingOpenGLESAndroidKHR#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrGraphicsBindingOpenGLESAndroidKHR getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrGraphicsBindingOpenGLESAndroidKHR.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrGraphicsBindingOpenGLESAndroidKHR.nnext(address()); } - /** @return the value of the {@code display} field. */ - @NativeType("EGLDisplay") - public long display() { return XrGraphicsBindingOpenGLESAndroidKHR.ndisplay(address()); } - /** @return the value of the {@code config} field. */ - @NativeType("EGLConfig") - public long config() { return XrGraphicsBindingOpenGLESAndroidKHR.nconfig(address()); } - /** @return the value of the {@code context} field. */ - @NativeType("EGLContext") - public long context() { return XrGraphicsBindingOpenGLESAndroidKHR.ncontext(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrGraphicsBindingOpenGLESAndroidKHR.ntype(address(), value); return this; } - /** Sets the {@link KHROpenglEsEnable#XR_TYPE_GRAPHICS_BINDING_OPENGL_ES_ANDROID_KHR TYPE_GRAPHICS_BINDING_OPENGL_ES_ANDROID_KHR} value to the {@code type} field. */ - public Buffer type$Default() { return type(KHROpenglEsEnable.XR_TYPE_GRAPHICS_BINDING_OPENGL_ES_ANDROID_KHR); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrGraphicsBindingOpenGLESAndroidKHR.nnext(address(), value); return this; } - /** Sets the specified value to the {@code display} field. */ - public Buffer display(@NativeType("EGLDisplay") long value) { XrGraphicsBindingOpenGLESAndroidKHR.ndisplay(address(), value); return this; } - /** Sets the specified value to the {@code config} field. */ - public Buffer config(@NativeType("EGLConfig") long value) { XrGraphicsBindingOpenGLESAndroidKHR.nconfig(address(), value); return this; } - /** Sets the specified value to the {@code context} field. */ - public Buffer context(@NativeType("EGLContext") long value) { XrGraphicsBindingOpenGLESAndroidKHR.ncontext(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrGraphicsBindingOpenGLWaylandKHR.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrGraphicsBindingOpenGLWaylandKHR.java deleted file mode 100644 index 71fca1c0..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrGraphicsBindingOpenGLWaylandKHR.java +++ /dev/null @@ -1,321 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrGraphicsBindingOpenGLWaylandKHR {
- *     XrStructureType type;
- *     void const * next;
- *     struct wl_display * display;
- * }
- */ -public class XrGraphicsBindingOpenGLWaylandKHR extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - DISPLAY; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - DISPLAY = layout.offsetof(2); - } - - /** - * Creates a {@code XrGraphicsBindingOpenGLWaylandKHR} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrGraphicsBindingOpenGLWaylandKHR(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code display} field. */ - @NativeType("struct wl_display *") - public long display() { return ndisplay(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrGraphicsBindingOpenGLWaylandKHR type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link KHROpenglEnable#XR_TYPE_GRAPHICS_BINDING_OPENGL_WAYLAND_KHR TYPE_GRAPHICS_BINDING_OPENGL_WAYLAND_KHR} value to the {@code type} field. */ - public XrGraphicsBindingOpenGLWaylandKHR type$Default() { return type(KHROpenglEnable.XR_TYPE_GRAPHICS_BINDING_OPENGL_WAYLAND_KHR); } - /** Sets the specified value to the {@code next} field. */ - public XrGraphicsBindingOpenGLWaylandKHR next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code display} field. */ - public XrGraphicsBindingOpenGLWaylandKHR display(@NativeType("struct wl_display *") long value) { ndisplay(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrGraphicsBindingOpenGLWaylandKHR set( - int type, - long next, - long display - ) { - type(type); - next(next); - display(display); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrGraphicsBindingOpenGLWaylandKHR set(XrGraphicsBindingOpenGLWaylandKHR src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrGraphicsBindingOpenGLWaylandKHR} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrGraphicsBindingOpenGLWaylandKHR malloc() { - return wrap(XrGraphicsBindingOpenGLWaylandKHR.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrGraphicsBindingOpenGLWaylandKHR} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrGraphicsBindingOpenGLWaylandKHR calloc() { - return wrap(XrGraphicsBindingOpenGLWaylandKHR.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrGraphicsBindingOpenGLWaylandKHR} instance allocated with {@link BufferUtils}. */ - public static XrGraphicsBindingOpenGLWaylandKHR create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrGraphicsBindingOpenGLWaylandKHR.class, memAddress(container), container); - } - - /** Returns a new {@code XrGraphicsBindingOpenGLWaylandKHR} instance for the specified memory address. */ - public static XrGraphicsBindingOpenGLWaylandKHR create(long address) { - return wrap(XrGraphicsBindingOpenGLWaylandKHR.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrGraphicsBindingOpenGLWaylandKHR createSafe(long address) { - return address == NULL ? null : wrap(XrGraphicsBindingOpenGLWaylandKHR.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrGraphicsBindingOpenGLWaylandKHR.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrGraphicsBindingOpenGLWaylandKHR} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrGraphicsBindingOpenGLWaylandKHR malloc(MemoryStack stack) { - return wrap(XrGraphicsBindingOpenGLWaylandKHR.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrGraphicsBindingOpenGLWaylandKHR} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrGraphicsBindingOpenGLWaylandKHR calloc(MemoryStack stack) { - return wrap(XrGraphicsBindingOpenGLWaylandKHR.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrGraphicsBindingOpenGLWaylandKHR.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrGraphicsBindingOpenGLWaylandKHR.NEXT); } - /** Unsafe version of {@link #display}. */ - public static long ndisplay(long struct) { return memGetAddress(struct + XrGraphicsBindingOpenGLWaylandKHR.DISPLAY); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrGraphicsBindingOpenGLWaylandKHR.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrGraphicsBindingOpenGLWaylandKHR.NEXT, value); } - /** Unsafe version of {@link #display(long) display}. */ - public static void ndisplay(long struct, long value) { memPutAddress(struct + XrGraphicsBindingOpenGLWaylandKHR.DISPLAY, check(value)); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XrGraphicsBindingOpenGLWaylandKHR.DISPLAY)); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrGraphicsBindingOpenGLWaylandKHR} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrGraphicsBindingOpenGLWaylandKHR ELEMENT_FACTORY = XrGraphicsBindingOpenGLWaylandKHR.create(-1L); - - /** - * Creates a new {@code XrGraphicsBindingOpenGLWaylandKHR.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrGraphicsBindingOpenGLWaylandKHR#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrGraphicsBindingOpenGLWaylandKHR getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrGraphicsBindingOpenGLWaylandKHR.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrGraphicsBindingOpenGLWaylandKHR.nnext(address()); } - /** @return the value of the {@code display} field. */ - @NativeType("struct wl_display *") - public long display() { return XrGraphicsBindingOpenGLWaylandKHR.ndisplay(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrGraphicsBindingOpenGLWaylandKHR.ntype(address(), value); return this; } - /** Sets the {@link KHROpenglEnable#XR_TYPE_GRAPHICS_BINDING_OPENGL_WAYLAND_KHR TYPE_GRAPHICS_BINDING_OPENGL_WAYLAND_KHR} value to the {@code type} field. */ - public Buffer type$Default() { return type(KHROpenglEnable.XR_TYPE_GRAPHICS_BINDING_OPENGL_WAYLAND_KHR); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrGraphicsBindingOpenGLWaylandKHR.nnext(address(), value); return this; } - /** Sets the specified value to the {@code display} field. */ - public Buffer display(@NativeType("struct wl_display *") long value) { XrGraphicsBindingOpenGLWaylandKHR.ndisplay(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrGraphicsBindingOpenGLWin32KHR.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrGraphicsBindingOpenGLWin32KHR.java deleted file mode 100644 index 0eeb6399..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrGraphicsBindingOpenGLWin32KHR.java +++ /dev/null @@ -1,342 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrGraphicsBindingOpenGLWin32KHR {
- *     XrStructureType type;
- *     void const * next;
- *     HDC hDC;
- *     HGLRC hGLRC;
- * }
- */ -public class XrGraphicsBindingOpenGLWin32KHR extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - HDC, - HGLRC; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - HDC = layout.offsetof(2); - HGLRC = layout.offsetof(3); - } - - /** - * Creates a {@code XrGraphicsBindingOpenGLWin32KHR} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrGraphicsBindingOpenGLWin32KHR(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code hDC} field. */ - @NativeType("HDC") - public long hDC() { return nhDC(address()); } - /** @return the value of the {@code hGLRC} field. */ - @NativeType("HGLRC") - public long hGLRC() { return nhGLRC(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrGraphicsBindingOpenGLWin32KHR type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link KHROpenglEnable#XR_TYPE_GRAPHICS_BINDING_OPENGL_WIN32_KHR TYPE_GRAPHICS_BINDING_OPENGL_WIN32_KHR} value to the {@code type} field. */ - public XrGraphicsBindingOpenGLWin32KHR type$Default() { return type(KHROpenglEnable.XR_TYPE_GRAPHICS_BINDING_OPENGL_WIN32_KHR); } - /** Sets the specified value to the {@code next} field. */ - public XrGraphicsBindingOpenGLWin32KHR next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code hDC} field. */ - public XrGraphicsBindingOpenGLWin32KHR hDC(@NativeType("HDC") long value) { nhDC(address(), value); return this; } - /** Sets the specified value to the {@code hGLRC} field. */ - public XrGraphicsBindingOpenGLWin32KHR hGLRC(@NativeType("HGLRC") long value) { nhGLRC(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrGraphicsBindingOpenGLWin32KHR set( - int type, - long next, - long hDC, - long hGLRC - ) { - type(type); - next(next); - hDC(hDC); - hGLRC(hGLRC); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrGraphicsBindingOpenGLWin32KHR set(XrGraphicsBindingOpenGLWin32KHR src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrGraphicsBindingOpenGLWin32KHR} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrGraphicsBindingOpenGLWin32KHR malloc() { - return wrap(XrGraphicsBindingOpenGLWin32KHR.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrGraphicsBindingOpenGLWin32KHR} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrGraphicsBindingOpenGLWin32KHR calloc() { - return wrap(XrGraphicsBindingOpenGLWin32KHR.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrGraphicsBindingOpenGLWin32KHR} instance allocated with {@link BufferUtils}. */ - public static XrGraphicsBindingOpenGLWin32KHR create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrGraphicsBindingOpenGLWin32KHR.class, memAddress(container), container); - } - - /** Returns a new {@code XrGraphicsBindingOpenGLWin32KHR} instance for the specified memory address. */ - public static XrGraphicsBindingOpenGLWin32KHR create(long address) { - return wrap(XrGraphicsBindingOpenGLWin32KHR.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrGraphicsBindingOpenGLWin32KHR createSafe(long address) { - return address == NULL ? null : wrap(XrGraphicsBindingOpenGLWin32KHR.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrGraphicsBindingOpenGLWin32KHR.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrGraphicsBindingOpenGLWin32KHR} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrGraphicsBindingOpenGLWin32KHR malloc(MemoryStack stack) { - return wrap(XrGraphicsBindingOpenGLWin32KHR.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrGraphicsBindingOpenGLWin32KHR} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrGraphicsBindingOpenGLWin32KHR calloc(MemoryStack stack) { - return wrap(XrGraphicsBindingOpenGLWin32KHR.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrGraphicsBindingOpenGLWin32KHR.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrGraphicsBindingOpenGLWin32KHR.NEXT); } - /** Unsafe version of {@link #hDC}. */ - public static long nhDC(long struct) { return memGetAddress(struct + XrGraphicsBindingOpenGLWin32KHR.HDC); } - /** Unsafe version of {@link #hGLRC}. */ - public static long nhGLRC(long struct) { return memGetAddress(struct + XrGraphicsBindingOpenGLWin32KHR.HGLRC); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrGraphicsBindingOpenGLWin32KHR.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrGraphicsBindingOpenGLWin32KHR.NEXT, value); } - /** Unsafe version of {@link #hDC(long) hDC}. */ - public static void nhDC(long struct, long value) { memPutAddress(struct + XrGraphicsBindingOpenGLWin32KHR.HDC, check(value)); } - /** Unsafe version of {@link #hGLRC(long) hGLRC}. */ - public static void nhGLRC(long struct, long value) { memPutAddress(struct + XrGraphicsBindingOpenGLWin32KHR.HGLRC, check(value)); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XrGraphicsBindingOpenGLWin32KHR.HDC)); - check(memGetAddress(struct + XrGraphicsBindingOpenGLWin32KHR.HGLRC)); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrGraphicsBindingOpenGLWin32KHR} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrGraphicsBindingOpenGLWin32KHR ELEMENT_FACTORY = XrGraphicsBindingOpenGLWin32KHR.create(-1L); - - /** - * Creates a new {@code XrGraphicsBindingOpenGLWin32KHR.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrGraphicsBindingOpenGLWin32KHR#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrGraphicsBindingOpenGLWin32KHR getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrGraphicsBindingOpenGLWin32KHR.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrGraphicsBindingOpenGLWin32KHR.nnext(address()); } - /** @return the value of the {@code hDC} field. */ - @NativeType("HDC") - public long hDC() { return XrGraphicsBindingOpenGLWin32KHR.nhDC(address()); } - /** @return the value of the {@code hGLRC} field. */ - @NativeType("HGLRC") - public long hGLRC() { return XrGraphicsBindingOpenGLWin32KHR.nhGLRC(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrGraphicsBindingOpenGLWin32KHR.ntype(address(), value); return this; } - /** Sets the {@link KHROpenglEnable#XR_TYPE_GRAPHICS_BINDING_OPENGL_WIN32_KHR TYPE_GRAPHICS_BINDING_OPENGL_WIN32_KHR} value to the {@code type} field. */ - public Buffer type$Default() { return type(KHROpenglEnable.XR_TYPE_GRAPHICS_BINDING_OPENGL_WIN32_KHR); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrGraphicsBindingOpenGLWin32KHR.nnext(address(), value); return this; } - /** Sets the specified value to the {@code hDC} field. */ - public Buffer hDC(@NativeType("HDC") long value) { XrGraphicsBindingOpenGLWin32KHR.nhDC(address(), value); return this; } - /** Sets the specified value to the {@code hGLRC} field. */ - public Buffer hGLRC(@NativeType("HGLRC") long value) { XrGraphicsBindingOpenGLWin32KHR.nhGLRC(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrGraphicsBindingOpenGLXlibKHR.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrGraphicsBindingOpenGLXlibKHR.java deleted file mode 100644 index 7d23cbb3..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrGraphicsBindingOpenGLXlibKHR.java +++ /dev/null @@ -1,404 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrGraphicsBindingOpenGLXlibKHR {
- *     XrStructureType type;
- *     void const * next;
- *     Display * xDisplay;
- *     uint32_t visualid;
- *     GLXFBConfig glxFBConfig;
- *     GLXDrawable glxDrawable;
- *     GLXContext glxContext;
- * }
- */ -public class XrGraphicsBindingOpenGLXlibKHR extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - XDISPLAY, - VISUALID, - GLXFBCONFIG, - GLXDRAWABLE, - GLXCONTEXT; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(4), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - XDISPLAY = layout.offsetof(2); - VISUALID = layout.offsetof(3); - GLXFBCONFIG = layout.offsetof(4); - GLXDRAWABLE = layout.offsetof(5); - GLXCONTEXT = layout.offsetof(6); - } - - /** - * Creates a {@code XrGraphicsBindingOpenGLXlibKHR} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrGraphicsBindingOpenGLXlibKHR(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code xDisplay} field. */ - @NativeType("Display *") - public long xDisplay() { return nxDisplay(address()); } - /** @return the value of the {@code visualid} field. */ - @NativeType("uint32_t") - public int visualid() { return nvisualid(address()); } - /** @return the value of the {@code glxFBConfig} field. */ - @NativeType("GLXFBConfig") - public long glxFBConfig() { return nglxFBConfig(address()); } - /** @return the value of the {@code glxDrawable} field. */ - @NativeType("GLXDrawable") - public long glxDrawable() { return nglxDrawable(address()); } - /** @return the value of the {@code glxContext} field. */ - @NativeType("GLXContext") - public long glxContext() { return nglxContext(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrGraphicsBindingOpenGLXlibKHR type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link KHROpenglEnable#XR_TYPE_GRAPHICS_BINDING_OPENGL_XLIB_KHR TYPE_GRAPHICS_BINDING_OPENGL_XLIB_KHR} value to the {@code type} field. */ - public XrGraphicsBindingOpenGLXlibKHR type$Default() { return type(KHROpenglEnable.XR_TYPE_GRAPHICS_BINDING_OPENGL_XLIB_KHR); } - /** Sets the specified value to the {@code next} field. */ - public XrGraphicsBindingOpenGLXlibKHR next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code xDisplay} field. */ - public XrGraphicsBindingOpenGLXlibKHR xDisplay(@NativeType("Display *") long value) { nxDisplay(address(), value); return this; } - /** Sets the specified value to the {@code visualid} field. */ - public XrGraphicsBindingOpenGLXlibKHR visualid(@NativeType("uint32_t") int value) { nvisualid(address(), value); return this; } - /** Sets the specified value to the {@code glxFBConfig} field. */ - public XrGraphicsBindingOpenGLXlibKHR glxFBConfig(@NativeType("GLXFBConfig") long value) { nglxFBConfig(address(), value); return this; } - /** Sets the specified value to the {@code glxDrawable} field. */ - public XrGraphicsBindingOpenGLXlibKHR glxDrawable(@NativeType("GLXDrawable") long value) { nglxDrawable(address(), value); return this; } - /** Sets the specified value to the {@code glxContext} field. */ - public XrGraphicsBindingOpenGLXlibKHR glxContext(@NativeType("GLXContext") long value) { nglxContext(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrGraphicsBindingOpenGLXlibKHR set( - int type, - long next, - long xDisplay, - int visualid, - long glxFBConfig, - long glxDrawable, - long glxContext - ) { - type(type); - next(next); - xDisplay(xDisplay); - visualid(visualid); - glxFBConfig(glxFBConfig); - glxDrawable(glxDrawable); - glxContext(glxContext); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrGraphicsBindingOpenGLXlibKHR set(XrGraphicsBindingOpenGLXlibKHR src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrGraphicsBindingOpenGLXlibKHR} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrGraphicsBindingOpenGLXlibKHR malloc() { - return wrap(XrGraphicsBindingOpenGLXlibKHR.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrGraphicsBindingOpenGLXlibKHR} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrGraphicsBindingOpenGLXlibKHR calloc() { - return wrap(XrGraphicsBindingOpenGLXlibKHR.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrGraphicsBindingOpenGLXlibKHR} instance allocated with {@link BufferUtils}. */ - public static XrGraphicsBindingOpenGLXlibKHR create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrGraphicsBindingOpenGLXlibKHR.class, memAddress(container), container); - } - - /** Returns a new {@code XrGraphicsBindingOpenGLXlibKHR} instance for the specified memory address. */ - public static XrGraphicsBindingOpenGLXlibKHR create(long address) { - return wrap(XrGraphicsBindingOpenGLXlibKHR.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrGraphicsBindingOpenGLXlibKHR createSafe(long address) { - return address == NULL ? null : wrap(XrGraphicsBindingOpenGLXlibKHR.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrGraphicsBindingOpenGLXlibKHR.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrGraphicsBindingOpenGLXlibKHR} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrGraphicsBindingOpenGLXlibKHR malloc(MemoryStack stack) { - return wrap(XrGraphicsBindingOpenGLXlibKHR.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrGraphicsBindingOpenGLXlibKHR} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrGraphicsBindingOpenGLXlibKHR calloc(MemoryStack stack) { - return wrap(XrGraphicsBindingOpenGLXlibKHR.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrGraphicsBindingOpenGLXlibKHR.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrGraphicsBindingOpenGLXlibKHR.NEXT); } - /** Unsafe version of {@link #xDisplay}. */ - public static long nxDisplay(long struct) { return memGetAddress(struct + XrGraphicsBindingOpenGLXlibKHR.XDISPLAY); } - /** Unsafe version of {@link #visualid}. */ - public static int nvisualid(long struct) { return UNSAFE.getInt(null, struct + XrGraphicsBindingOpenGLXlibKHR.VISUALID); } - /** Unsafe version of {@link #glxFBConfig}. */ - public static long nglxFBConfig(long struct) { return memGetAddress(struct + XrGraphicsBindingOpenGLXlibKHR.GLXFBCONFIG); } - /** Unsafe version of {@link #glxDrawable}. */ - public static long nglxDrawable(long struct) { return memGetAddress(struct + XrGraphicsBindingOpenGLXlibKHR.GLXDRAWABLE); } - /** Unsafe version of {@link #glxContext}. */ - public static long nglxContext(long struct) { return memGetAddress(struct + XrGraphicsBindingOpenGLXlibKHR.GLXCONTEXT); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrGraphicsBindingOpenGLXlibKHR.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrGraphicsBindingOpenGLXlibKHR.NEXT, value); } - /** Unsafe version of {@link #xDisplay(long) xDisplay}. */ - public static void nxDisplay(long struct, long value) { memPutAddress(struct + XrGraphicsBindingOpenGLXlibKHR.XDISPLAY, check(value)); } - /** Unsafe version of {@link #visualid(int) visualid}. */ - public static void nvisualid(long struct, int value) { UNSAFE.putInt(null, struct + XrGraphicsBindingOpenGLXlibKHR.VISUALID, value); } - /** Unsafe version of {@link #glxFBConfig(long) glxFBConfig}. */ - public static void nglxFBConfig(long struct, long value) { memPutAddress(struct + XrGraphicsBindingOpenGLXlibKHR.GLXFBCONFIG, check(value)); } - /** Unsafe version of {@link #glxDrawable(long) glxDrawable}. */ - public static void nglxDrawable(long struct, long value) { memPutAddress(struct + XrGraphicsBindingOpenGLXlibKHR.GLXDRAWABLE, check(value)); } - /** Unsafe version of {@link #glxContext(long) glxContext}. */ - public static void nglxContext(long struct, long value) { memPutAddress(struct + XrGraphicsBindingOpenGLXlibKHR.GLXCONTEXT, check(value)); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XrGraphicsBindingOpenGLXlibKHR.XDISPLAY)); - check(memGetAddress(struct + XrGraphicsBindingOpenGLXlibKHR.GLXFBCONFIG)); - check(memGetAddress(struct + XrGraphicsBindingOpenGLXlibKHR.GLXDRAWABLE)); - check(memGetAddress(struct + XrGraphicsBindingOpenGLXlibKHR.GLXCONTEXT)); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrGraphicsBindingOpenGLXlibKHR} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrGraphicsBindingOpenGLXlibKHR ELEMENT_FACTORY = XrGraphicsBindingOpenGLXlibKHR.create(-1L); - - /** - * Creates a new {@code XrGraphicsBindingOpenGLXlibKHR.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrGraphicsBindingOpenGLXlibKHR#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrGraphicsBindingOpenGLXlibKHR getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrGraphicsBindingOpenGLXlibKHR.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrGraphicsBindingOpenGLXlibKHR.nnext(address()); } - /** @return the value of the {@code xDisplay} field. */ - @NativeType("Display *") - public long xDisplay() { return XrGraphicsBindingOpenGLXlibKHR.nxDisplay(address()); } - /** @return the value of the {@code visualid} field. */ - @NativeType("uint32_t") - public int visualid() { return XrGraphicsBindingOpenGLXlibKHR.nvisualid(address()); } - /** @return the value of the {@code glxFBConfig} field. */ - @NativeType("GLXFBConfig") - public long glxFBConfig() { return XrGraphicsBindingOpenGLXlibKHR.nglxFBConfig(address()); } - /** @return the value of the {@code glxDrawable} field. */ - @NativeType("GLXDrawable") - public long glxDrawable() { return XrGraphicsBindingOpenGLXlibKHR.nglxDrawable(address()); } - /** @return the value of the {@code glxContext} field. */ - @NativeType("GLXContext") - public long glxContext() { return XrGraphicsBindingOpenGLXlibKHR.nglxContext(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrGraphicsBindingOpenGLXlibKHR.ntype(address(), value); return this; } - /** Sets the {@link KHROpenglEnable#XR_TYPE_GRAPHICS_BINDING_OPENGL_XLIB_KHR TYPE_GRAPHICS_BINDING_OPENGL_XLIB_KHR} value to the {@code type} field. */ - public Buffer type$Default() { return type(KHROpenglEnable.XR_TYPE_GRAPHICS_BINDING_OPENGL_XLIB_KHR); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrGraphicsBindingOpenGLXlibKHR.nnext(address(), value); return this; } - /** Sets the specified value to the {@code xDisplay} field. */ - public Buffer xDisplay(@NativeType("Display *") long value) { XrGraphicsBindingOpenGLXlibKHR.nxDisplay(address(), value); return this; } - /** Sets the specified value to the {@code visualid} field. */ - public Buffer visualid(@NativeType("uint32_t") int value) { XrGraphicsBindingOpenGLXlibKHR.nvisualid(address(), value); return this; } - /** Sets the specified value to the {@code glxFBConfig} field. */ - public Buffer glxFBConfig(@NativeType("GLXFBConfig") long value) { XrGraphicsBindingOpenGLXlibKHR.nglxFBConfig(address(), value); return this; } - /** Sets the specified value to the {@code glxDrawable} field. */ - public Buffer glxDrawable(@NativeType("GLXDrawable") long value) { XrGraphicsBindingOpenGLXlibKHR.nglxDrawable(address(), value); return this; } - /** Sets the specified value to the {@code glxContext} field. */ - public Buffer glxContext(@NativeType("GLXContext") long value) { XrGraphicsBindingOpenGLXlibKHR.nglxContext(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrGraphicsRequirementsOpenGLESKHR.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrGraphicsRequirementsOpenGLESKHR.java deleted file mode 100644 index b6d889b4..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrGraphicsRequirementsOpenGLESKHR.java +++ /dev/null @@ -1,319 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrGraphicsRequirementsOpenGLESKHR {
- *     XrStructureType type;
- *     void * next;
- *     XrVersion minApiVersionSupported;
- *     XrVersion maxApiVersionSupported;
- * }
- */ -public class XrGraphicsRequirementsOpenGLESKHR extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - MINAPIVERSIONSUPPORTED, - MAXAPIVERSIONSUPPORTED; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(8), - __member(8) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - MINAPIVERSIONSUPPORTED = layout.offsetof(2); - MAXAPIVERSIONSUPPORTED = layout.offsetof(3); - } - - /** - * Creates a {@code XrGraphicsRequirementsOpenGLESKHR} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrGraphicsRequirementsOpenGLESKHR(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return the value of the {@code minApiVersionSupported} field. */ - @NativeType("XrVersion") - public long minApiVersionSupported() { return nminApiVersionSupported(address()); } - /** @return the value of the {@code maxApiVersionSupported} field. */ - @NativeType("XrVersion") - public long maxApiVersionSupported() { return nmaxApiVersionSupported(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrGraphicsRequirementsOpenGLESKHR type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link KHROpenglEsEnable#XR_TYPE_GRAPHICS_REQUIREMENTS_OPENGL_ES_KHR TYPE_GRAPHICS_REQUIREMENTS_OPENGL_ES_KHR} value to the {@code type} field. */ - public XrGraphicsRequirementsOpenGLESKHR type$Default() { return type(KHROpenglEsEnable.XR_TYPE_GRAPHICS_REQUIREMENTS_OPENGL_ES_KHR); } - /** Sets the specified value to the {@code next} field. */ - public XrGraphicsRequirementsOpenGLESKHR next(@NativeType("void *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code minApiVersionSupported} field. */ - public XrGraphicsRequirementsOpenGLESKHR minApiVersionSupported(@NativeType("XrVersion") long value) { nminApiVersionSupported(address(), value); return this; } - /** Sets the specified value to the {@code maxApiVersionSupported} field. */ - public XrGraphicsRequirementsOpenGLESKHR maxApiVersionSupported(@NativeType("XrVersion") long value) { nmaxApiVersionSupported(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrGraphicsRequirementsOpenGLESKHR set( - int type, - long next, - long minApiVersionSupported, - long maxApiVersionSupported - ) { - type(type); - next(next); - minApiVersionSupported(minApiVersionSupported); - maxApiVersionSupported(maxApiVersionSupported); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrGraphicsRequirementsOpenGLESKHR set(XrGraphicsRequirementsOpenGLESKHR src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrGraphicsRequirementsOpenGLESKHR} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrGraphicsRequirementsOpenGLESKHR malloc() { - return wrap(XrGraphicsRequirementsOpenGLESKHR.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrGraphicsRequirementsOpenGLESKHR} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrGraphicsRequirementsOpenGLESKHR calloc() { - return wrap(XrGraphicsRequirementsOpenGLESKHR.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrGraphicsRequirementsOpenGLESKHR} instance allocated with {@link BufferUtils}. */ - public static XrGraphicsRequirementsOpenGLESKHR create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrGraphicsRequirementsOpenGLESKHR.class, memAddress(container), container); - } - - /** Returns a new {@code XrGraphicsRequirementsOpenGLESKHR} instance for the specified memory address. */ - public static XrGraphicsRequirementsOpenGLESKHR create(long address) { - return wrap(XrGraphicsRequirementsOpenGLESKHR.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrGraphicsRequirementsOpenGLESKHR createSafe(long address) { - return address == NULL ? null : wrap(XrGraphicsRequirementsOpenGLESKHR.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrGraphicsRequirementsOpenGLESKHR.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrGraphicsRequirementsOpenGLESKHR} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrGraphicsRequirementsOpenGLESKHR malloc(MemoryStack stack) { - return wrap(XrGraphicsRequirementsOpenGLESKHR.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrGraphicsRequirementsOpenGLESKHR} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrGraphicsRequirementsOpenGLESKHR calloc(MemoryStack stack) { - return wrap(XrGraphicsRequirementsOpenGLESKHR.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrGraphicsRequirementsOpenGLESKHR.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrGraphicsRequirementsOpenGLESKHR.NEXT); } - /** Unsafe version of {@link #minApiVersionSupported}. */ - public static long nminApiVersionSupported(long struct) { return UNSAFE.getLong(null, struct + XrGraphicsRequirementsOpenGLESKHR.MINAPIVERSIONSUPPORTED); } - /** Unsafe version of {@link #maxApiVersionSupported}. */ - public static long nmaxApiVersionSupported(long struct) { return UNSAFE.getLong(null, struct + XrGraphicsRequirementsOpenGLESKHR.MAXAPIVERSIONSUPPORTED); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrGraphicsRequirementsOpenGLESKHR.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrGraphicsRequirementsOpenGLESKHR.NEXT, value); } - /** Unsafe version of {@link #minApiVersionSupported(long) minApiVersionSupported}. */ - public static void nminApiVersionSupported(long struct, long value) { UNSAFE.putLong(null, struct + XrGraphicsRequirementsOpenGLESKHR.MINAPIVERSIONSUPPORTED, value); } - /** Unsafe version of {@link #maxApiVersionSupported(long) maxApiVersionSupported}. */ - public static void nmaxApiVersionSupported(long struct, long value) { UNSAFE.putLong(null, struct + XrGraphicsRequirementsOpenGLESKHR.MAXAPIVERSIONSUPPORTED, value); } - - // ----------------------------------- - - /** An array of {@link XrGraphicsRequirementsOpenGLESKHR} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrGraphicsRequirementsOpenGLESKHR ELEMENT_FACTORY = XrGraphicsRequirementsOpenGLESKHR.create(-1L); - - /** - * Creates a new {@code XrGraphicsRequirementsOpenGLESKHR.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrGraphicsRequirementsOpenGLESKHR#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrGraphicsRequirementsOpenGLESKHR getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrGraphicsRequirementsOpenGLESKHR.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrGraphicsRequirementsOpenGLESKHR.nnext(address()); } - /** @return the value of the {@code minApiVersionSupported} field. */ - @NativeType("XrVersion") - public long minApiVersionSupported() { return XrGraphicsRequirementsOpenGLESKHR.nminApiVersionSupported(address()); } - /** @return the value of the {@code maxApiVersionSupported} field. */ - @NativeType("XrVersion") - public long maxApiVersionSupported() { return XrGraphicsRequirementsOpenGLESKHR.nmaxApiVersionSupported(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrGraphicsRequirementsOpenGLESKHR.ntype(address(), value); return this; } - /** Sets the {@link KHROpenglEsEnable#XR_TYPE_GRAPHICS_REQUIREMENTS_OPENGL_ES_KHR TYPE_GRAPHICS_REQUIREMENTS_OPENGL_ES_KHR} value to the {@code type} field. */ - public Buffer type$Default() { return type(KHROpenglEsEnable.XR_TYPE_GRAPHICS_REQUIREMENTS_OPENGL_ES_KHR); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrGraphicsRequirementsOpenGLESKHR.nnext(address(), value); return this; } - /** Sets the specified value to the {@code minApiVersionSupported} field. */ - public Buffer minApiVersionSupported(@NativeType("XrVersion") long value) { XrGraphicsRequirementsOpenGLESKHR.nminApiVersionSupported(address(), value); return this; } - /** Sets the specified value to the {@code maxApiVersionSupported} field. */ - public Buffer maxApiVersionSupported(@NativeType("XrVersion") long value) { XrGraphicsRequirementsOpenGLESKHR.nmaxApiVersionSupported(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrGraphicsRequirementsOpenGLKHR.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrGraphicsRequirementsOpenGLKHR.java deleted file mode 100644 index c99f0924..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrGraphicsRequirementsOpenGLKHR.java +++ /dev/null @@ -1,319 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrGraphicsRequirementsOpenGLKHR {
- *     XrStructureType type;
- *     void * next;
- *     XrVersion minApiVersionSupported;
- *     XrVersion maxApiVersionSupported;
- * }
- */ -public class XrGraphicsRequirementsOpenGLKHR extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - MINAPIVERSIONSUPPORTED, - MAXAPIVERSIONSUPPORTED; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(8), - __member(8) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - MINAPIVERSIONSUPPORTED = layout.offsetof(2); - MAXAPIVERSIONSUPPORTED = layout.offsetof(3); - } - - /** - * Creates a {@code XrGraphicsRequirementsOpenGLKHR} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrGraphicsRequirementsOpenGLKHR(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return the value of the {@code minApiVersionSupported} field. */ - @NativeType("XrVersion") - public long minApiVersionSupported() { return nminApiVersionSupported(address()); } - /** @return the value of the {@code maxApiVersionSupported} field. */ - @NativeType("XrVersion") - public long maxApiVersionSupported() { return nmaxApiVersionSupported(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrGraphicsRequirementsOpenGLKHR type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link KHROpenglEnable#XR_TYPE_GRAPHICS_REQUIREMENTS_OPENGL_KHR TYPE_GRAPHICS_REQUIREMENTS_OPENGL_KHR} value to the {@code type} field. */ - public XrGraphicsRequirementsOpenGLKHR type$Default() { return type(KHROpenglEnable.XR_TYPE_GRAPHICS_REQUIREMENTS_OPENGL_KHR); } - /** Sets the specified value to the {@code next} field. */ - public XrGraphicsRequirementsOpenGLKHR next(@NativeType("void *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code minApiVersionSupported} field. */ - public XrGraphicsRequirementsOpenGLKHR minApiVersionSupported(@NativeType("XrVersion") long value) { nminApiVersionSupported(address(), value); return this; } - /** Sets the specified value to the {@code maxApiVersionSupported} field. */ - public XrGraphicsRequirementsOpenGLKHR maxApiVersionSupported(@NativeType("XrVersion") long value) { nmaxApiVersionSupported(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrGraphicsRequirementsOpenGLKHR set( - int type, - long next, - long minApiVersionSupported, - long maxApiVersionSupported - ) { - type(type); - next(next); - minApiVersionSupported(minApiVersionSupported); - maxApiVersionSupported(maxApiVersionSupported); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrGraphicsRequirementsOpenGLKHR set(XrGraphicsRequirementsOpenGLKHR src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrGraphicsRequirementsOpenGLKHR} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrGraphicsRequirementsOpenGLKHR malloc() { - return wrap(XrGraphicsRequirementsOpenGLKHR.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrGraphicsRequirementsOpenGLKHR} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrGraphicsRequirementsOpenGLKHR calloc() { - return wrap(XrGraphicsRequirementsOpenGLKHR.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrGraphicsRequirementsOpenGLKHR} instance allocated with {@link BufferUtils}. */ - public static XrGraphicsRequirementsOpenGLKHR create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrGraphicsRequirementsOpenGLKHR.class, memAddress(container), container); - } - - /** Returns a new {@code XrGraphicsRequirementsOpenGLKHR} instance for the specified memory address. */ - public static XrGraphicsRequirementsOpenGLKHR create(long address) { - return wrap(XrGraphicsRequirementsOpenGLKHR.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrGraphicsRequirementsOpenGLKHR createSafe(long address) { - return address == NULL ? null : wrap(XrGraphicsRequirementsOpenGLKHR.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrGraphicsRequirementsOpenGLKHR.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrGraphicsRequirementsOpenGLKHR} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrGraphicsRequirementsOpenGLKHR malloc(MemoryStack stack) { - return wrap(XrGraphicsRequirementsOpenGLKHR.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrGraphicsRequirementsOpenGLKHR} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrGraphicsRequirementsOpenGLKHR calloc(MemoryStack stack) { - return wrap(XrGraphicsRequirementsOpenGLKHR.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrGraphicsRequirementsOpenGLKHR.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrGraphicsRequirementsOpenGLKHR.NEXT); } - /** Unsafe version of {@link #minApiVersionSupported}. */ - public static long nminApiVersionSupported(long struct) { return UNSAFE.getLong(null, struct + XrGraphicsRequirementsOpenGLKHR.MINAPIVERSIONSUPPORTED); } - /** Unsafe version of {@link #maxApiVersionSupported}. */ - public static long nmaxApiVersionSupported(long struct) { return UNSAFE.getLong(null, struct + XrGraphicsRequirementsOpenGLKHR.MAXAPIVERSIONSUPPORTED); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrGraphicsRequirementsOpenGLKHR.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrGraphicsRequirementsOpenGLKHR.NEXT, value); } - /** Unsafe version of {@link #minApiVersionSupported(long) minApiVersionSupported}. */ - public static void nminApiVersionSupported(long struct, long value) { UNSAFE.putLong(null, struct + XrGraphicsRequirementsOpenGLKHR.MINAPIVERSIONSUPPORTED, value); } - /** Unsafe version of {@link #maxApiVersionSupported(long) maxApiVersionSupported}. */ - public static void nmaxApiVersionSupported(long struct, long value) { UNSAFE.putLong(null, struct + XrGraphicsRequirementsOpenGLKHR.MAXAPIVERSIONSUPPORTED, value); } - - // ----------------------------------- - - /** An array of {@link XrGraphicsRequirementsOpenGLKHR} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrGraphicsRequirementsOpenGLKHR ELEMENT_FACTORY = XrGraphicsRequirementsOpenGLKHR.create(-1L); - - /** - * Creates a new {@code XrGraphicsRequirementsOpenGLKHR.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrGraphicsRequirementsOpenGLKHR#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrGraphicsRequirementsOpenGLKHR getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrGraphicsRequirementsOpenGLKHR.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrGraphicsRequirementsOpenGLKHR.nnext(address()); } - /** @return the value of the {@code minApiVersionSupported} field. */ - @NativeType("XrVersion") - public long minApiVersionSupported() { return XrGraphicsRequirementsOpenGLKHR.nminApiVersionSupported(address()); } - /** @return the value of the {@code maxApiVersionSupported} field. */ - @NativeType("XrVersion") - public long maxApiVersionSupported() { return XrGraphicsRequirementsOpenGLKHR.nmaxApiVersionSupported(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrGraphicsRequirementsOpenGLKHR.ntype(address(), value); return this; } - /** Sets the {@link KHROpenglEnable#XR_TYPE_GRAPHICS_REQUIREMENTS_OPENGL_KHR TYPE_GRAPHICS_REQUIREMENTS_OPENGL_KHR} value to the {@code type} field. */ - public Buffer type$Default() { return type(KHROpenglEnable.XR_TYPE_GRAPHICS_REQUIREMENTS_OPENGL_KHR); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrGraphicsRequirementsOpenGLKHR.nnext(address(), value); return this; } - /** Sets the specified value to the {@code minApiVersionSupported} field. */ - public Buffer minApiVersionSupported(@NativeType("XrVersion") long value) { XrGraphicsRequirementsOpenGLKHR.nminApiVersionSupported(address(), value); return this; } - /** Sets the specified value to the {@code maxApiVersionSupported} field. */ - public Buffer maxApiVersionSupported(@NativeType("XrVersion") long value) { XrGraphicsRequirementsOpenGLKHR.nmaxApiVersionSupported(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandCapsuleFB.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandCapsuleFB.java deleted file mode 100644 index 2e87f232..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandCapsuleFB.java +++ /dev/null @@ -1,176 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.system.NativeType; -import org.lwjgl.system.Struct; -import org.lwjgl.system.StructBuffer; - -import java.nio.ByteBuffer; - -import static org.lwjgl.openxr.FBHandTrackingCapsules.XR_FB_HAND_TRACKING_CAPSULE_POINT_COUNT; -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.NULL; -import static org.lwjgl.system.MemoryUtil.memAddress; - -/** - *

Layout

- * - *

- * struct XrHandCapsuleFB {
- *     {@link XrVector3f XrVector3f} points[XR_FB_HAND_TRACKING_CAPSULE_POINT_COUNT];
- *     float radius;
- *     XrHandJointEXT joint;
- * }
- */ -public class XrHandCapsuleFB extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - POINTS, - RADIUS, - JOINT; - - static { - Layout layout = __struct( - __array(XrVector3f.SIZEOF, XrVector3f.ALIGNOF, XR_FB_HAND_TRACKING_CAPSULE_POINT_COUNT), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - POINTS = layout.offsetof(0); - RADIUS = layout.offsetof(1); - JOINT = layout.offsetof(2); - } - - /** - * Creates a {@code XrHandCapsuleFB} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrHandCapsuleFB(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return a {@link XrVector3f}.Buffer view of the {@code points} field. */ - @NativeType("XrVector3f[XR_FB_HAND_TRACKING_CAPSULE_POINT_COUNT]") - public XrVector3f.Buffer points() { return npoints(address()); } - /** @return a {@link XrVector3f} view of the struct at the specified index of the {@code points} field. */ - public XrVector3f points(int index) { return npoints(address(), index); } - /** @return the value of the {@code radius} field. */ - public float radius() { return nradius(address()); } - /** @return the value of the {@code joint} field. */ - @NativeType("XrHandJointEXT") - public int joint() { return njoint(address()); } - - // ----------------------------------- - - /** Returns a new {@code XrHandCapsuleFB} instance for the specified memory address. */ - public static XrHandCapsuleFB create(long address) { - return wrap(XrHandCapsuleFB.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrHandCapsuleFB createSafe(long address) { - return address == NULL ? null : wrap(XrHandCapsuleFB.class, address); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrHandCapsuleFB.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #points}. */ - public static XrVector3f.Buffer npoints(long struct) { return XrVector3f.create(struct + XrHandCapsuleFB.POINTS, XR_FB_HAND_TRACKING_CAPSULE_POINT_COUNT); } - /** Unsafe version of {@link #points(int) points}. */ - public static XrVector3f npoints(long struct, int index) { - return XrVector3f.create(struct + XrHandCapsuleFB.POINTS + check(index, XR_FB_HAND_TRACKING_CAPSULE_POINT_COUNT) * XrVector3f.SIZEOF); - } - /** Unsafe version of {@link #radius}. */ - public static float nradius(long struct) { return UNSAFE.getFloat(null, struct + XrHandCapsuleFB.RADIUS); } - /** Unsafe version of {@link #joint}. */ - public static int njoint(long struct) { return UNSAFE.getInt(null, struct + XrHandCapsuleFB.JOINT); } - - // ----------------------------------- - - /** An array of {@link XrHandCapsuleFB} structs. */ - public static class Buffer extends StructBuffer { - - private static final XrHandCapsuleFB ELEMENT_FACTORY = XrHandCapsuleFB.create(-1L); - - /** - * Creates a new {@code XrHandCapsuleFB.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrHandCapsuleFB#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrHandCapsuleFB getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link XrVector3f}.Buffer view of the {@code points} field. */ - @NativeType("XrVector3f[XR_FB_HAND_TRACKING_CAPSULE_POINT_COUNT]") - public XrVector3f.Buffer points() { return XrHandCapsuleFB.npoints(address()); } - /** @return a {@link XrVector3f} view of the struct at the specified index of the {@code points} field. */ - public XrVector3f points(int index) { return XrHandCapsuleFB.npoints(address(), index); } - /** @return the value of the {@code radius} field. */ - public float radius() { return XrHandCapsuleFB.nradius(address()); } - /** @return the value of the {@code joint} field. */ - @NativeType("XrHandJointEXT") - public int joint() { return XrHandCapsuleFB.njoint(address()); } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandJointLocationEXT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandJointLocationEXT.java deleted file mode 100644 index a96b35a1..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandJointLocationEXT.java +++ /dev/null @@ -1,295 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrHandJointLocationEXT {
- *     XrSpaceLocationFlags locationFlags;
- *     {@link XrPosef XrPosef} pose;
- *     float radius;
- * }
- */ -public class XrHandJointLocationEXT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - LOCATIONFLAGS, - POSE, - RADIUS; - - static { - Layout layout = __struct( - __member(8), - __member(XrPosef.SIZEOF, XrPosef.ALIGNOF), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - LOCATIONFLAGS = layout.offsetof(0); - POSE = layout.offsetof(1); - RADIUS = layout.offsetof(2); - } - - /** - * Creates a {@code XrHandJointLocationEXT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrHandJointLocationEXT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code locationFlags} field. */ - @NativeType("XrSpaceLocationFlags") - public long locationFlags() { return nlocationFlags(address()); } - /** @return a {@link XrPosef} view of the {@code pose} field. */ - public XrPosef pose() { return npose(address()); } - /** @return the value of the {@code radius} field. */ - public float radius() { return nradius(address()); } - - /** Sets the specified value to the {@code locationFlags} field. */ - public XrHandJointLocationEXT locationFlags(@NativeType("XrSpaceLocationFlags") long value) { nlocationFlags(address(), value); return this; } - /** Copies the specified {@link XrPosef} to the {@code pose} field. */ - public XrHandJointLocationEXT pose(XrPosef value) { npose(address(), value); return this; } - /** Passes the {@code pose} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrHandJointLocationEXT pose(java.util.function.Consumer consumer) { consumer.accept(pose()); return this; } - /** Sets the specified value to the {@code radius} field. */ - public XrHandJointLocationEXT radius(float value) { nradius(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrHandJointLocationEXT set( - long locationFlags, - XrPosef pose, - float radius - ) { - locationFlags(locationFlags); - pose(pose); - radius(radius); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrHandJointLocationEXT set(XrHandJointLocationEXT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrHandJointLocationEXT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrHandJointLocationEXT malloc() { - return wrap(XrHandJointLocationEXT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrHandJointLocationEXT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrHandJointLocationEXT calloc() { - return wrap(XrHandJointLocationEXT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrHandJointLocationEXT} instance allocated with {@link BufferUtils}. */ - public static XrHandJointLocationEXT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrHandJointLocationEXT.class, memAddress(container), container); - } - - /** Returns a new {@code XrHandJointLocationEXT} instance for the specified memory address. */ - public static XrHandJointLocationEXT create(long address) { - return wrap(XrHandJointLocationEXT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrHandJointLocationEXT createSafe(long address) { - return address == NULL ? null : wrap(XrHandJointLocationEXT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrHandJointLocationEXT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrHandJointLocationEXT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrHandJointLocationEXT malloc(MemoryStack stack) { - return wrap(XrHandJointLocationEXT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrHandJointLocationEXT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrHandJointLocationEXT calloc(MemoryStack stack) { - return wrap(XrHandJointLocationEXT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #locationFlags}. */ - public static long nlocationFlags(long struct) { return UNSAFE.getLong(null, struct + XrHandJointLocationEXT.LOCATIONFLAGS); } - /** Unsafe version of {@link #pose}. */ - public static XrPosef npose(long struct) { return XrPosef.create(struct + XrHandJointLocationEXT.POSE); } - /** Unsafe version of {@link #radius}. */ - public static float nradius(long struct) { return UNSAFE.getFloat(null, struct + XrHandJointLocationEXT.RADIUS); } - - /** Unsafe version of {@link #locationFlags(long) locationFlags}. */ - public static void nlocationFlags(long struct, long value) { UNSAFE.putLong(null, struct + XrHandJointLocationEXT.LOCATIONFLAGS, value); } - /** Unsafe version of {@link #pose(XrPosef) pose}. */ - public static void npose(long struct, XrPosef value) { memCopy(value.address(), struct + XrHandJointLocationEXT.POSE, XrPosef.SIZEOF); } - /** Unsafe version of {@link #radius(float) radius}. */ - public static void nradius(long struct, float value) { UNSAFE.putFloat(null, struct + XrHandJointLocationEXT.RADIUS, value); } - - // ----------------------------------- - - /** An array of {@link XrHandJointLocationEXT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrHandJointLocationEXT ELEMENT_FACTORY = XrHandJointLocationEXT.create(-1L); - - /** - * Creates a new {@code XrHandJointLocationEXT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrHandJointLocationEXT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrHandJointLocationEXT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code locationFlags} field. */ - @NativeType("XrSpaceLocationFlags") - public long locationFlags() { return XrHandJointLocationEXT.nlocationFlags(address()); } - /** @return a {@link XrPosef} view of the {@code pose} field. */ - public XrPosef pose() { return XrHandJointLocationEXT.npose(address()); } - /** @return the value of the {@code radius} field. */ - public float radius() { return XrHandJointLocationEXT.nradius(address()); } - - /** Sets the specified value to the {@code locationFlags} field. */ - public Buffer locationFlags(@NativeType("XrSpaceLocationFlags") long value) { XrHandJointLocationEXT.nlocationFlags(address(), value); return this; } - /** Copies the specified {@link XrPosef} to the {@code pose} field. */ - public Buffer pose(XrPosef value) { XrHandJointLocationEXT.npose(address(), value); return this; } - /** Passes the {@code pose} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer pose(java.util.function.Consumer consumer) { consumer.accept(pose()); return this; } - /** Sets the specified value to the {@code radius} field. */ - public Buffer radius(float value) { XrHandJointLocationEXT.nradius(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandJointLocationsEXT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandJointLocationsEXT.java deleted file mode 100644 index b0ef8376..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandJointLocationsEXT.java +++ /dev/null @@ -1,355 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrHandJointLocationsEXT {
- *     XrStructureType type;
- *     void * next;
- *     XrBool32 isActive;
- *     uint32_t jointCount;
- *     {@link XrHandJointLocationEXT XrHandJointLocationEXT} * jointLocations;
- * }
- */ -public class XrHandJointLocationsEXT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - ISACTIVE, - JOINTCOUNT, - JOINTLOCATIONS; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - ISACTIVE = layout.offsetof(2); - JOINTCOUNT = layout.offsetof(3); - JOINTLOCATIONS = layout.offsetof(4); - } - - /** - * Creates a {@code XrHandJointLocationsEXT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrHandJointLocationsEXT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return the value of the {@code isActive} field. */ - @NativeType("XrBool32") - public boolean isActive() { return nisActive(address()) != 0; } - /** @return the value of the {@code jointCount} field. */ - @NativeType("uint32_t") - public int jointCount() { return njointCount(address()); } - /** @return a {@link XrHandJointLocationEXT.Buffer} view of the struct array pointed to by the {@code jointLocations} field. */ - @NativeType("XrHandJointLocationEXT *") - public XrHandJointLocationEXT.Buffer jointLocations() { return njointLocations(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrHandJointLocationsEXT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link EXTHandTracking#XR_TYPE_HAND_JOINT_LOCATIONS_EXT TYPE_HAND_JOINT_LOCATIONS_EXT} value to the {@code type} field. */ - public XrHandJointLocationsEXT type$Default() { return type(EXTHandTracking.XR_TYPE_HAND_JOINT_LOCATIONS_EXT); } - /** Sets the specified value to the {@code next} field. */ - public XrHandJointLocationsEXT next(@NativeType("void *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code isActive} field. */ - public XrHandJointLocationsEXT isActive(@NativeType("XrBool32") boolean value) { nisActive(address(), value ? 1 : 0); return this; } - /** Sets the address of the specified {@link XrHandJointLocationEXT.Buffer} to the {@code jointLocations} field. */ - public XrHandJointLocationsEXT jointLocations(@NativeType("XrHandJointLocationEXT *") XrHandJointLocationEXT.Buffer value) { njointLocations(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrHandJointLocationsEXT set( - int type, - long next, - boolean isActive, - XrHandJointLocationEXT.Buffer jointLocations - ) { - type(type); - next(next); - isActive(isActive); - jointLocations(jointLocations); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrHandJointLocationsEXT set(XrHandJointLocationsEXT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrHandJointLocationsEXT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrHandJointLocationsEXT malloc() { - return wrap(XrHandJointLocationsEXT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrHandJointLocationsEXT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrHandJointLocationsEXT calloc() { - return wrap(XrHandJointLocationsEXT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrHandJointLocationsEXT} instance allocated with {@link BufferUtils}. */ - public static XrHandJointLocationsEXT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrHandJointLocationsEXT.class, memAddress(container), container); - } - - /** Returns a new {@code XrHandJointLocationsEXT} instance for the specified memory address. */ - public static XrHandJointLocationsEXT create(long address) { - return wrap(XrHandJointLocationsEXT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrHandJointLocationsEXT createSafe(long address) { - return address == NULL ? null : wrap(XrHandJointLocationsEXT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrHandJointLocationsEXT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrHandJointLocationsEXT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrHandJointLocationsEXT malloc(MemoryStack stack) { - return wrap(XrHandJointLocationsEXT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrHandJointLocationsEXT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrHandJointLocationsEXT calloc(MemoryStack stack) { - return wrap(XrHandJointLocationsEXT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrHandJointLocationsEXT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrHandJointLocationsEXT.NEXT); } - /** Unsafe version of {@link #isActive}. */ - public static int nisActive(long struct) { return UNSAFE.getInt(null, struct + XrHandJointLocationsEXT.ISACTIVE); } - /** Unsafe version of {@link #jointCount}. */ - public static int njointCount(long struct) { return UNSAFE.getInt(null, struct + XrHandJointLocationsEXT.JOINTCOUNT); } - /** Unsafe version of {@link #jointLocations}. */ - public static XrHandJointLocationEXT.Buffer njointLocations(long struct) { return XrHandJointLocationEXT.create(memGetAddress(struct + XrHandJointLocationsEXT.JOINTLOCATIONS), njointCount(struct)); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrHandJointLocationsEXT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrHandJointLocationsEXT.NEXT, value); } - /** Unsafe version of {@link #isActive(boolean) isActive}. */ - public static void nisActive(long struct, int value) { UNSAFE.putInt(null, struct + XrHandJointLocationsEXT.ISACTIVE, value); } - /** Sets the specified value to the {@code jointCount} field of the specified {@code struct}. */ - public static void njointCount(long struct, int value) { UNSAFE.putInt(null, struct + XrHandJointLocationsEXT.JOINTCOUNT, value); } - /** Unsafe version of {@link #jointLocations(XrHandJointLocationEXT.Buffer) jointLocations}. */ - public static void njointLocations(long struct, XrHandJointLocationEXT.Buffer value) { memPutAddress(struct + XrHandJointLocationsEXT.JOINTLOCATIONS, value.address()); njointCount(struct, value.remaining()); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XrHandJointLocationsEXT.JOINTLOCATIONS)); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrHandJointLocationsEXT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrHandJointLocationsEXT ELEMENT_FACTORY = XrHandJointLocationsEXT.create(-1L); - - /** - * Creates a new {@code XrHandJointLocationsEXT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrHandJointLocationsEXT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrHandJointLocationsEXT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrHandJointLocationsEXT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrHandJointLocationsEXT.nnext(address()); } - /** @return the value of the {@code isActive} field. */ - @NativeType("XrBool32") - public boolean isActive() { return XrHandJointLocationsEXT.nisActive(address()) != 0; } - /** @return the value of the {@code jointCount} field. */ - @NativeType("uint32_t") - public int jointCount() { return XrHandJointLocationsEXT.njointCount(address()); } - /** @return a {@link XrHandJointLocationEXT.Buffer} view of the struct array pointed to by the {@code jointLocations} field. */ - @NativeType("XrHandJointLocationEXT *") - public XrHandJointLocationEXT.Buffer jointLocations() { return XrHandJointLocationsEXT.njointLocations(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrHandJointLocationsEXT.ntype(address(), value); return this; } - /** Sets the {@link EXTHandTracking#XR_TYPE_HAND_JOINT_LOCATIONS_EXT TYPE_HAND_JOINT_LOCATIONS_EXT} value to the {@code type} field. */ - public Buffer type$Default() { return type(EXTHandTracking.XR_TYPE_HAND_JOINT_LOCATIONS_EXT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrHandJointLocationsEXT.nnext(address(), value); return this; } - /** Sets the specified value to the {@code isActive} field. */ - public Buffer isActive(@NativeType("XrBool32") boolean value) { XrHandJointLocationsEXT.nisActive(address(), value ? 1 : 0); return this; } - /** Sets the address of the specified {@link XrHandJointLocationEXT.Buffer} to the {@code jointLocations} field. */ - public Buffer jointLocations(@NativeType("XrHandJointLocationEXT *") XrHandJointLocationEXT.Buffer value) { XrHandJointLocationsEXT.njointLocations(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandJointVelocitiesEXT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandJointVelocitiesEXT.java deleted file mode 100644 index 680f974c..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandJointVelocitiesEXT.java +++ /dev/null @@ -1,335 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrHandJointVelocitiesEXT {
- *     XrStructureType type;
- *     void * next;
- *     uint32_t jointCount;
- *     {@link XrHandJointVelocityEXT XrHandJointVelocityEXT} * jointVelocities;
- * }
- */ -public class XrHandJointVelocitiesEXT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - JOINTCOUNT, - JOINTVELOCITIES; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - JOINTCOUNT = layout.offsetof(2); - JOINTVELOCITIES = layout.offsetof(3); - } - - /** - * Creates a {@code XrHandJointVelocitiesEXT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrHandJointVelocitiesEXT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return the value of the {@code jointCount} field. */ - @NativeType("uint32_t") - public int jointCount() { return njointCount(address()); } - /** @return a {@link XrHandJointVelocityEXT.Buffer} view of the struct array pointed to by the {@code jointVelocities} field. */ - @NativeType("XrHandJointVelocityEXT *") - public XrHandJointVelocityEXT.Buffer jointVelocities() { return njointVelocities(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrHandJointVelocitiesEXT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link EXTHandTracking#XR_TYPE_HAND_JOINT_VELOCITIES_EXT TYPE_HAND_JOINT_VELOCITIES_EXT} value to the {@code type} field. */ - public XrHandJointVelocitiesEXT type$Default() { return type(EXTHandTracking.XR_TYPE_HAND_JOINT_VELOCITIES_EXT); } - /** Sets the specified value to the {@code next} field. */ - public XrHandJointVelocitiesEXT next(@NativeType("void *") long value) { nnext(address(), value); return this; } - /** Sets the address of the specified {@link XrHandJointVelocityEXT.Buffer} to the {@code jointVelocities} field. */ - public XrHandJointVelocitiesEXT jointVelocities(@NativeType("XrHandJointVelocityEXT *") XrHandJointVelocityEXT.Buffer value) { njointVelocities(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrHandJointVelocitiesEXT set( - int type, - long next, - XrHandJointVelocityEXT.Buffer jointVelocities - ) { - type(type); - next(next); - jointVelocities(jointVelocities); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrHandJointVelocitiesEXT set(XrHandJointVelocitiesEXT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrHandJointVelocitiesEXT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrHandJointVelocitiesEXT malloc() { - return wrap(XrHandJointVelocitiesEXT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrHandJointVelocitiesEXT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrHandJointVelocitiesEXT calloc() { - return wrap(XrHandJointVelocitiesEXT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrHandJointVelocitiesEXT} instance allocated with {@link BufferUtils}. */ - public static XrHandJointVelocitiesEXT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrHandJointVelocitiesEXT.class, memAddress(container), container); - } - - /** Returns a new {@code XrHandJointVelocitiesEXT} instance for the specified memory address. */ - public static XrHandJointVelocitiesEXT create(long address) { - return wrap(XrHandJointVelocitiesEXT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrHandJointVelocitiesEXT createSafe(long address) { - return address == NULL ? null : wrap(XrHandJointVelocitiesEXT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrHandJointVelocitiesEXT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrHandJointVelocitiesEXT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrHandJointVelocitiesEXT malloc(MemoryStack stack) { - return wrap(XrHandJointVelocitiesEXT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrHandJointVelocitiesEXT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrHandJointVelocitiesEXT calloc(MemoryStack stack) { - return wrap(XrHandJointVelocitiesEXT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrHandJointVelocitiesEXT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrHandJointVelocitiesEXT.NEXT); } - /** Unsafe version of {@link #jointCount}. */ - public static int njointCount(long struct) { return UNSAFE.getInt(null, struct + XrHandJointVelocitiesEXT.JOINTCOUNT); } - /** Unsafe version of {@link #jointVelocities}. */ - public static XrHandJointVelocityEXT.Buffer njointVelocities(long struct) { return XrHandJointVelocityEXT.create(memGetAddress(struct + XrHandJointVelocitiesEXT.JOINTVELOCITIES), njointCount(struct)); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrHandJointVelocitiesEXT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrHandJointVelocitiesEXT.NEXT, value); } - /** Sets the specified value to the {@code jointCount} field of the specified {@code struct}. */ - public static void njointCount(long struct, int value) { UNSAFE.putInt(null, struct + XrHandJointVelocitiesEXT.JOINTCOUNT, value); } - /** Unsafe version of {@link #jointVelocities(XrHandJointVelocityEXT.Buffer) jointVelocities}. */ - public static void njointVelocities(long struct, XrHandJointVelocityEXT.Buffer value) { memPutAddress(struct + XrHandJointVelocitiesEXT.JOINTVELOCITIES, value.address()); njointCount(struct, value.remaining()); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XrHandJointVelocitiesEXT.JOINTVELOCITIES)); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrHandJointVelocitiesEXT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrHandJointVelocitiesEXT ELEMENT_FACTORY = XrHandJointVelocitiesEXT.create(-1L); - - /** - * Creates a new {@code XrHandJointVelocitiesEXT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrHandJointVelocitiesEXT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrHandJointVelocitiesEXT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrHandJointVelocitiesEXT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrHandJointVelocitiesEXT.nnext(address()); } - /** @return the value of the {@code jointCount} field. */ - @NativeType("uint32_t") - public int jointCount() { return XrHandJointVelocitiesEXT.njointCount(address()); } - /** @return a {@link XrHandJointVelocityEXT.Buffer} view of the struct array pointed to by the {@code jointVelocities} field. */ - @NativeType("XrHandJointVelocityEXT *") - public XrHandJointVelocityEXT.Buffer jointVelocities() { return XrHandJointVelocitiesEXT.njointVelocities(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrHandJointVelocitiesEXT.ntype(address(), value); return this; } - /** Sets the {@link EXTHandTracking#XR_TYPE_HAND_JOINT_VELOCITIES_EXT TYPE_HAND_JOINT_VELOCITIES_EXT} value to the {@code type} field. */ - public Buffer type$Default() { return type(EXTHandTracking.XR_TYPE_HAND_JOINT_VELOCITIES_EXT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrHandJointVelocitiesEXT.nnext(address(), value); return this; } - /** Sets the address of the specified {@link XrHandJointVelocityEXT.Buffer} to the {@code jointVelocities} field. */ - public Buffer jointVelocities(@NativeType("XrHandJointVelocityEXT *") XrHandJointVelocityEXT.Buffer value) { XrHandJointVelocitiesEXT.njointVelocities(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandJointVelocityEXT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandJointVelocityEXT.java deleted file mode 100644 index 32a22292..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandJointVelocityEXT.java +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrHandJointVelocityEXT {
- *     XrSpaceVelocityFlags velocityFlags;
- *     {@link XrVector3f XrVector3f} linearVelocity;
- *     {@link XrVector3f XrVector3f} angularVelocity;
- * }
- */ -public class XrHandJointVelocityEXT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - VELOCITYFLAGS, - LINEARVELOCITY, - ANGULARVELOCITY; - - static { - Layout layout = __struct( - __member(8), - __member(XrVector3f.SIZEOF, XrVector3f.ALIGNOF), - __member(XrVector3f.SIZEOF, XrVector3f.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - VELOCITYFLAGS = layout.offsetof(0); - LINEARVELOCITY = layout.offsetof(1); - ANGULARVELOCITY = layout.offsetof(2); - } - - /** - * Creates a {@code XrHandJointVelocityEXT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrHandJointVelocityEXT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code velocityFlags} field. */ - @NativeType("XrSpaceVelocityFlags") - public long velocityFlags() { return nvelocityFlags(address()); } - /** @return a {@link XrVector3f} view of the {@code linearVelocity} field. */ - public XrVector3f linearVelocity() { return nlinearVelocity(address()); } - /** @return a {@link XrVector3f} view of the {@code angularVelocity} field. */ - public XrVector3f angularVelocity() { return nangularVelocity(address()); } - - /** Sets the specified value to the {@code velocityFlags} field. */ - public XrHandJointVelocityEXT velocityFlags(@NativeType("XrSpaceVelocityFlags") long value) { nvelocityFlags(address(), value); return this; } - /** Copies the specified {@link XrVector3f} to the {@code linearVelocity} field. */ - public XrHandJointVelocityEXT linearVelocity(XrVector3f value) { nlinearVelocity(address(), value); return this; } - /** Passes the {@code linearVelocity} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrHandJointVelocityEXT linearVelocity(java.util.function.Consumer consumer) { consumer.accept(linearVelocity()); return this; } - /** Copies the specified {@link XrVector3f} to the {@code angularVelocity} field. */ - public XrHandJointVelocityEXT angularVelocity(XrVector3f value) { nangularVelocity(address(), value); return this; } - /** Passes the {@code angularVelocity} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrHandJointVelocityEXT angularVelocity(java.util.function.Consumer consumer) { consumer.accept(angularVelocity()); return this; } - - /** Initializes this struct with the specified values. */ - public XrHandJointVelocityEXT set( - long velocityFlags, - XrVector3f linearVelocity, - XrVector3f angularVelocity - ) { - velocityFlags(velocityFlags); - linearVelocity(linearVelocity); - angularVelocity(angularVelocity); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrHandJointVelocityEXT set(XrHandJointVelocityEXT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrHandJointVelocityEXT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrHandJointVelocityEXT malloc() { - return wrap(XrHandJointVelocityEXT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrHandJointVelocityEXT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrHandJointVelocityEXT calloc() { - return wrap(XrHandJointVelocityEXT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrHandJointVelocityEXT} instance allocated with {@link BufferUtils}. */ - public static XrHandJointVelocityEXT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrHandJointVelocityEXT.class, memAddress(container), container); - } - - /** Returns a new {@code XrHandJointVelocityEXT} instance for the specified memory address. */ - public static XrHandJointVelocityEXT create(long address) { - return wrap(XrHandJointVelocityEXT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrHandJointVelocityEXT createSafe(long address) { - return address == NULL ? null : wrap(XrHandJointVelocityEXT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrHandJointVelocityEXT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrHandJointVelocityEXT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrHandJointVelocityEXT malloc(MemoryStack stack) { - return wrap(XrHandJointVelocityEXT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrHandJointVelocityEXT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrHandJointVelocityEXT calloc(MemoryStack stack) { - return wrap(XrHandJointVelocityEXT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #velocityFlags}. */ - public static long nvelocityFlags(long struct) { return UNSAFE.getLong(null, struct + XrHandJointVelocityEXT.VELOCITYFLAGS); } - /** Unsafe version of {@link #linearVelocity}. */ - public static XrVector3f nlinearVelocity(long struct) { return XrVector3f.create(struct + XrHandJointVelocityEXT.LINEARVELOCITY); } - /** Unsafe version of {@link #angularVelocity}. */ - public static XrVector3f nangularVelocity(long struct) { return XrVector3f.create(struct + XrHandJointVelocityEXT.ANGULARVELOCITY); } - - /** Unsafe version of {@link #velocityFlags(long) velocityFlags}. */ - public static void nvelocityFlags(long struct, long value) { UNSAFE.putLong(null, struct + XrHandJointVelocityEXT.VELOCITYFLAGS, value); } - /** Unsafe version of {@link #linearVelocity(XrVector3f) linearVelocity}. */ - public static void nlinearVelocity(long struct, XrVector3f value) { memCopy(value.address(), struct + XrHandJointVelocityEXT.LINEARVELOCITY, XrVector3f.SIZEOF); } - /** Unsafe version of {@link #angularVelocity(XrVector3f) angularVelocity}. */ - public static void nangularVelocity(long struct, XrVector3f value) { memCopy(value.address(), struct + XrHandJointVelocityEXT.ANGULARVELOCITY, XrVector3f.SIZEOF); } - - // ----------------------------------- - - /** An array of {@link XrHandJointVelocityEXT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrHandJointVelocityEXT ELEMENT_FACTORY = XrHandJointVelocityEXT.create(-1L); - - /** - * Creates a new {@code XrHandJointVelocityEXT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrHandJointVelocityEXT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrHandJointVelocityEXT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code velocityFlags} field. */ - @NativeType("XrSpaceVelocityFlags") - public long velocityFlags() { return XrHandJointVelocityEXT.nvelocityFlags(address()); } - /** @return a {@link XrVector3f} view of the {@code linearVelocity} field. */ - public XrVector3f linearVelocity() { return XrHandJointVelocityEXT.nlinearVelocity(address()); } - /** @return a {@link XrVector3f} view of the {@code angularVelocity} field. */ - public XrVector3f angularVelocity() { return XrHandJointVelocityEXT.nangularVelocity(address()); } - - /** Sets the specified value to the {@code velocityFlags} field. */ - public Buffer velocityFlags(@NativeType("XrSpaceVelocityFlags") long value) { XrHandJointVelocityEXT.nvelocityFlags(address(), value); return this; } - /** Copies the specified {@link XrVector3f} to the {@code linearVelocity} field. */ - public Buffer linearVelocity(XrVector3f value) { XrHandJointVelocityEXT.nlinearVelocity(address(), value); return this; } - /** Passes the {@code linearVelocity} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer linearVelocity(java.util.function.Consumer consumer) { consumer.accept(linearVelocity()); return this; } - /** Copies the specified {@link XrVector3f} to the {@code angularVelocity} field. */ - public Buffer angularVelocity(XrVector3f value) { XrHandJointVelocityEXT.nangularVelocity(address(), value); return this; } - /** Passes the {@code angularVelocity} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer angularVelocity(java.util.function.Consumer consumer) { consumer.accept(angularVelocity()); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandJointsLocateInfoEXT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandJointsLocateInfoEXT.java deleted file mode 100644 index 374f6a41..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandJointsLocateInfoEXT.java +++ /dev/null @@ -1,341 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrHandJointsLocateInfoEXT {
- *     XrStructureType type;
- *     void const * next;
- *     XrSpace baseSpace;
- *     XrTime time;
- * }
- */ -public class XrHandJointsLocateInfoEXT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - BASESPACE, - TIME; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(8) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - BASESPACE = layout.offsetof(2); - TIME = layout.offsetof(3); - } - - /** - * Creates a {@code XrHandJointsLocateInfoEXT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrHandJointsLocateInfoEXT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code baseSpace} field. */ - @NativeType("XrSpace") - public long baseSpace() { return nbaseSpace(address()); } - /** @return the value of the {@code time} field. */ - @NativeType("XrTime") - public long time() { return ntime(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrHandJointsLocateInfoEXT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link EXTHandTracking#XR_TYPE_HAND_JOINTS_LOCATE_INFO_EXT TYPE_HAND_JOINTS_LOCATE_INFO_EXT} value to the {@code type} field. */ - public XrHandJointsLocateInfoEXT type$Default() { return type(EXTHandTracking.XR_TYPE_HAND_JOINTS_LOCATE_INFO_EXT); } - /** Sets the specified value to the {@code next} field. */ - public XrHandJointsLocateInfoEXT next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code baseSpace} field. */ - public XrHandJointsLocateInfoEXT baseSpace(XrSpace value) { nbaseSpace(address(), value); return this; } - /** Sets the specified value to the {@code time} field. */ - public XrHandJointsLocateInfoEXT time(@NativeType("XrTime") long value) { ntime(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrHandJointsLocateInfoEXT set( - int type, - long next, - XrSpace baseSpace, - long time - ) { - type(type); - next(next); - baseSpace(baseSpace); - time(time); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrHandJointsLocateInfoEXT set(XrHandJointsLocateInfoEXT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrHandJointsLocateInfoEXT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrHandJointsLocateInfoEXT malloc() { - return wrap(XrHandJointsLocateInfoEXT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrHandJointsLocateInfoEXT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrHandJointsLocateInfoEXT calloc() { - return wrap(XrHandJointsLocateInfoEXT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrHandJointsLocateInfoEXT} instance allocated with {@link BufferUtils}. */ - public static XrHandJointsLocateInfoEXT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrHandJointsLocateInfoEXT.class, memAddress(container), container); - } - - /** Returns a new {@code XrHandJointsLocateInfoEXT} instance for the specified memory address. */ - public static XrHandJointsLocateInfoEXT create(long address) { - return wrap(XrHandJointsLocateInfoEXT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrHandJointsLocateInfoEXT createSafe(long address) { - return address == NULL ? null : wrap(XrHandJointsLocateInfoEXT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrHandJointsLocateInfoEXT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrHandJointsLocateInfoEXT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrHandJointsLocateInfoEXT malloc(MemoryStack stack) { - return wrap(XrHandJointsLocateInfoEXT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrHandJointsLocateInfoEXT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrHandJointsLocateInfoEXT calloc(MemoryStack stack) { - return wrap(XrHandJointsLocateInfoEXT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrHandJointsLocateInfoEXT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrHandJointsLocateInfoEXT.NEXT); } - /** Unsafe version of {@link #baseSpace}. */ - public static long nbaseSpace(long struct) { return memGetAddress(struct + XrHandJointsLocateInfoEXT.BASESPACE); } - /** Unsafe version of {@link #time}. */ - public static long ntime(long struct) { return UNSAFE.getLong(null, struct + XrHandJointsLocateInfoEXT.TIME); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrHandJointsLocateInfoEXT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrHandJointsLocateInfoEXT.NEXT, value); } - /** Unsafe version of {@link #baseSpace(XrSpace) baseSpace}. */ - public static void nbaseSpace(long struct, XrSpace value) { memPutAddress(struct + XrHandJointsLocateInfoEXT.BASESPACE, value.address()); } - /** Unsafe version of {@link #time(long) time}. */ - public static void ntime(long struct, long value) { UNSAFE.putLong(null, struct + XrHandJointsLocateInfoEXT.TIME, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XrHandJointsLocateInfoEXT.BASESPACE)); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrHandJointsLocateInfoEXT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrHandJointsLocateInfoEXT ELEMENT_FACTORY = XrHandJointsLocateInfoEXT.create(-1L); - - /** - * Creates a new {@code XrHandJointsLocateInfoEXT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrHandJointsLocateInfoEXT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrHandJointsLocateInfoEXT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrHandJointsLocateInfoEXT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrHandJointsLocateInfoEXT.nnext(address()); } - /** @return the value of the {@code baseSpace} field. */ - @NativeType("XrSpace") - public long baseSpace() { return XrHandJointsLocateInfoEXT.nbaseSpace(address()); } - /** @return the value of the {@code time} field. */ - @NativeType("XrTime") - public long time() { return XrHandJointsLocateInfoEXT.ntime(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrHandJointsLocateInfoEXT.ntype(address(), value); return this; } - /** Sets the {@link EXTHandTracking#XR_TYPE_HAND_JOINTS_LOCATE_INFO_EXT TYPE_HAND_JOINTS_LOCATE_INFO_EXT} value to the {@code type} field. */ - public Buffer type$Default() { return type(EXTHandTracking.XR_TYPE_HAND_JOINTS_LOCATE_INFO_EXT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrHandJointsLocateInfoEXT.nnext(address(), value); return this; } - /** Sets the specified value to the {@code baseSpace} field. */ - public Buffer baseSpace(XrSpace value) { XrHandJointsLocateInfoEXT.nbaseSpace(address(), value); return this; } - /** Sets the specified value to the {@code time} field. */ - public Buffer time(@NativeType("XrTime") long value) { XrHandJointsLocateInfoEXT.ntime(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandJointsMotionRangeInfoEXT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandJointsMotionRangeInfoEXT.java deleted file mode 100644 index 4075726f..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandJointsMotionRangeInfoEXT.java +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrHandJointsMotionRangeInfoEXT {
- *     XrStructureType type;
- *     void const * next;
- *     XrHandJointsMotionRangeEXT handJointsMotionRange;
- * }
- */ -public class XrHandJointsMotionRangeInfoEXT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - HANDJOINTSMOTIONRANGE; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - HANDJOINTSMOTIONRANGE = layout.offsetof(2); - } - - /** - * Creates a {@code XrHandJointsMotionRangeInfoEXT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrHandJointsMotionRangeInfoEXT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code handJointsMotionRange} field. */ - @NativeType("XrHandJointsMotionRangeEXT") - public int handJointsMotionRange() { return nhandJointsMotionRange(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrHandJointsMotionRangeInfoEXT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link EXTHandJointsMotionRange#XR_TYPE_HAND_JOINTS_MOTION_RANGE_INFO_EXT TYPE_HAND_JOINTS_MOTION_RANGE_INFO_EXT} value to the {@code type} field. */ - public XrHandJointsMotionRangeInfoEXT type$Default() { return type(EXTHandJointsMotionRange.XR_TYPE_HAND_JOINTS_MOTION_RANGE_INFO_EXT); } - /** Sets the specified value to the {@code next} field. */ - public XrHandJointsMotionRangeInfoEXT next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code handJointsMotionRange} field. */ - public XrHandJointsMotionRangeInfoEXT handJointsMotionRange(@NativeType("XrHandJointsMotionRangeEXT") int value) { nhandJointsMotionRange(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrHandJointsMotionRangeInfoEXT set( - int type, - long next, - int handJointsMotionRange - ) { - type(type); - next(next); - handJointsMotionRange(handJointsMotionRange); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrHandJointsMotionRangeInfoEXT set(XrHandJointsMotionRangeInfoEXT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrHandJointsMotionRangeInfoEXT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrHandJointsMotionRangeInfoEXT malloc() { - return wrap(XrHandJointsMotionRangeInfoEXT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrHandJointsMotionRangeInfoEXT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrHandJointsMotionRangeInfoEXT calloc() { - return wrap(XrHandJointsMotionRangeInfoEXT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrHandJointsMotionRangeInfoEXT} instance allocated with {@link BufferUtils}. */ - public static XrHandJointsMotionRangeInfoEXT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrHandJointsMotionRangeInfoEXT.class, memAddress(container), container); - } - - /** Returns a new {@code XrHandJointsMotionRangeInfoEXT} instance for the specified memory address. */ - public static XrHandJointsMotionRangeInfoEXT create(long address) { - return wrap(XrHandJointsMotionRangeInfoEXT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrHandJointsMotionRangeInfoEXT createSafe(long address) { - return address == NULL ? null : wrap(XrHandJointsMotionRangeInfoEXT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrHandJointsMotionRangeInfoEXT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrHandJointsMotionRangeInfoEXT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrHandJointsMotionRangeInfoEXT malloc(MemoryStack stack) { - return wrap(XrHandJointsMotionRangeInfoEXT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrHandJointsMotionRangeInfoEXT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrHandJointsMotionRangeInfoEXT calloc(MemoryStack stack) { - return wrap(XrHandJointsMotionRangeInfoEXT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrHandJointsMotionRangeInfoEXT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrHandJointsMotionRangeInfoEXT.NEXT); } - /** Unsafe version of {@link #handJointsMotionRange}. */ - public static int nhandJointsMotionRange(long struct) { return UNSAFE.getInt(null, struct + XrHandJointsMotionRangeInfoEXT.HANDJOINTSMOTIONRANGE); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrHandJointsMotionRangeInfoEXT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrHandJointsMotionRangeInfoEXT.NEXT, value); } - /** Unsafe version of {@link #handJointsMotionRange(int) handJointsMotionRange}. */ - public static void nhandJointsMotionRange(long struct, int value) { UNSAFE.putInt(null, struct + XrHandJointsMotionRangeInfoEXT.HANDJOINTSMOTIONRANGE, value); } - - // ----------------------------------- - - /** An array of {@link XrHandJointsMotionRangeInfoEXT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrHandJointsMotionRangeInfoEXT ELEMENT_FACTORY = XrHandJointsMotionRangeInfoEXT.create(-1L); - - /** - * Creates a new {@code XrHandJointsMotionRangeInfoEXT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrHandJointsMotionRangeInfoEXT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrHandJointsMotionRangeInfoEXT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrHandJointsMotionRangeInfoEXT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrHandJointsMotionRangeInfoEXT.nnext(address()); } - /** @return the value of the {@code handJointsMotionRange} field. */ - @NativeType("XrHandJointsMotionRangeEXT") - public int handJointsMotionRange() { return XrHandJointsMotionRangeInfoEXT.nhandJointsMotionRange(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrHandJointsMotionRangeInfoEXT.ntype(address(), value); return this; } - /** Sets the {@link EXTHandJointsMotionRange#XR_TYPE_HAND_JOINTS_MOTION_RANGE_INFO_EXT TYPE_HAND_JOINTS_MOTION_RANGE_INFO_EXT} value to the {@code type} field. */ - public Buffer type$Default() { return type(EXTHandJointsMotionRange.XR_TYPE_HAND_JOINTS_MOTION_RANGE_INFO_EXT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrHandJointsMotionRangeInfoEXT.nnext(address(), value); return this; } - /** Sets the specified value to the {@code handJointsMotionRange} field. */ - public Buffer handJointsMotionRange(@NativeType("XrHandJointsMotionRangeEXT") int value) { XrHandJointsMotionRangeInfoEXT.nhandJointsMotionRange(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandMeshIndexBufferMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandMeshIndexBufferMSFT.java deleted file mode 100644 index 368827ff..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandMeshIndexBufferMSFT.java +++ /dev/null @@ -1,332 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; -import java.nio.IntBuffer; - -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrHandMeshIndexBufferMSFT {
- *     uint32_t indexBufferKey;
- *     uint32_t indexCapacityInput;
- *     uint32_t indexCountOutput;
- *     uint32_t * indices;
- * }
- */ -public class XrHandMeshIndexBufferMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - INDEXBUFFERKEY, - INDEXCAPACITYINPUT, - INDEXCOUNTOUTPUT, - INDICES; - - static { - Layout layout = __struct( - __member(4), - __member(4), - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - INDEXBUFFERKEY = layout.offsetof(0); - INDEXCAPACITYINPUT = layout.offsetof(1); - INDEXCOUNTOUTPUT = layout.offsetof(2); - INDICES = layout.offsetof(3); - } - - /** - * Creates a {@code XrHandMeshIndexBufferMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrHandMeshIndexBufferMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code indexBufferKey} field. */ - @NativeType("uint32_t") - public int indexBufferKey() { return nindexBufferKey(address()); } - /** @return the value of the {@code indexCapacityInput} field. */ - @NativeType("uint32_t") - public int indexCapacityInput() { return nindexCapacityInput(address()); } - /** @return the value of the {@code indexCountOutput} field. */ - @NativeType("uint32_t") - public int indexCountOutput() { return nindexCountOutput(address()); } - /** @return a {@link IntBuffer} view of the data pointed to by the {@code indices} field. */ - @NativeType("uint32_t *") - public IntBuffer indices() { return nindices(address()); } - - /** Sets the specified value to the {@code indexBufferKey} field. */ - public XrHandMeshIndexBufferMSFT indexBufferKey(@NativeType("uint32_t") int value) { nindexBufferKey(address(), value); return this; } - /** Sets the specified value to the {@code indexCountOutput} field. */ - public XrHandMeshIndexBufferMSFT indexCountOutput(@NativeType("uint32_t") int value) { nindexCountOutput(address(), value); return this; } - /** Sets the address of the specified {@link IntBuffer} to the {@code indices} field. */ - public XrHandMeshIndexBufferMSFT indices(@NativeType("uint32_t *") IntBuffer value) { nindices(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrHandMeshIndexBufferMSFT set( - int indexBufferKey, - int indexCountOutput, - IntBuffer indices - ) { - indexBufferKey(indexBufferKey); - indexCountOutput(indexCountOutput); - indices(indices); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrHandMeshIndexBufferMSFT set(XrHandMeshIndexBufferMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrHandMeshIndexBufferMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrHandMeshIndexBufferMSFT malloc() { - return wrap(XrHandMeshIndexBufferMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrHandMeshIndexBufferMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrHandMeshIndexBufferMSFT calloc() { - return wrap(XrHandMeshIndexBufferMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrHandMeshIndexBufferMSFT} instance allocated with {@link BufferUtils}. */ - public static XrHandMeshIndexBufferMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrHandMeshIndexBufferMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrHandMeshIndexBufferMSFT} instance for the specified memory address. */ - public static XrHandMeshIndexBufferMSFT create(long address) { - return wrap(XrHandMeshIndexBufferMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrHandMeshIndexBufferMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrHandMeshIndexBufferMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrHandMeshIndexBufferMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrHandMeshIndexBufferMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrHandMeshIndexBufferMSFT malloc(MemoryStack stack) { - return wrap(XrHandMeshIndexBufferMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrHandMeshIndexBufferMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrHandMeshIndexBufferMSFT calloc(MemoryStack stack) { - return wrap(XrHandMeshIndexBufferMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #indexBufferKey}. */ - public static int nindexBufferKey(long struct) { return UNSAFE.getInt(null, struct + XrHandMeshIndexBufferMSFT.INDEXBUFFERKEY); } - /** Unsafe version of {@link #indexCapacityInput}. */ - public static int nindexCapacityInput(long struct) { return UNSAFE.getInt(null, struct + XrHandMeshIndexBufferMSFT.INDEXCAPACITYINPUT); } - /** Unsafe version of {@link #indexCountOutput}. */ - public static int nindexCountOutput(long struct) { return UNSAFE.getInt(null, struct + XrHandMeshIndexBufferMSFT.INDEXCOUNTOUTPUT); } - /** Unsafe version of {@link #indices() indices}. */ - public static IntBuffer nindices(long struct) { return memIntBuffer(memGetAddress(struct + XrHandMeshIndexBufferMSFT.INDICES), nindexCapacityInput(struct)); } - - /** Unsafe version of {@link #indexBufferKey(int) indexBufferKey}. */ - public static void nindexBufferKey(long struct, int value) { UNSAFE.putInt(null, struct + XrHandMeshIndexBufferMSFT.INDEXBUFFERKEY, value); } - /** Sets the specified value to the {@code indexCapacityInput} field of the specified {@code struct}. */ - public static void nindexCapacityInput(long struct, int value) { UNSAFE.putInt(null, struct + XrHandMeshIndexBufferMSFT.INDEXCAPACITYINPUT, value); } - /** Unsafe version of {@link #indexCountOutput(int) indexCountOutput}. */ - public static void nindexCountOutput(long struct, int value) { UNSAFE.putInt(null, struct + XrHandMeshIndexBufferMSFT.INDEXCOUNTOUTPUT, value); } - /** Unsafe version of {@link #indices(IntBuffer) indices}. */ - public static void nindices(long struct, IntBuffer value) { memPutAddress(struct + XrHandMeshIndexBufferMSFT.INDICES, memAddress(value)); nindexCapacityInput(struct, value.remaining()); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XrHandMeshIndexBufferMSFT.INDICES)); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrHandMeshIndexBufferMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrHandMeshIndexBufferMSFT ELEMENT_FACTORY = XrHandMeshIndexBufferMSFT.create(-1L); - - /** - * Creates a new {@code XrHandMeshIndexBufferMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrHandMeshIndexBufferMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrHandMeshIndexBufferMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code indexBufferKey} field. */ - @NativeType("uint32_t") - public int indexBufferKey() { return XrHandMeshIndexBufferMSFT.nindexBufferKey(address()); } - /** @return the value of the {@code indexCapacityInput} field. */ - @NativeType("uint32_t") - public int indexCapacityInput() { return XrHandMeshIndexBufferMSFT.nindexCapacityInput(address()); } - /** @return the value of the {@code indexCountOutput} field. */ - @NativeType("uint32_t") - public int indexCountOutput() { return XrHandMeshIndexBufferMSFT.nindexCountOutput(address()); } - /** @return a {@link IntBuffer} view of the data pointed to by the {@code indices} field. */ - @NativeType("uint32_t *") - public IntBuffer indices() { return XrHandMeshIndexBufferMSFT.nindices(address()); } - - /** Sets the specified value to the {@code indexBufferKey} field. */ - public Buffer indexBufferKey(@NativeType("uint32_t") int value) { XrHandMeshIndexBufferMSFT.nindexBufferKey(address(), value); return this; } - /** Sets the specified value to the {@code indexCountOutput} field. */ - public Buffer indexCountOutput(@NativeType("uint32_t") int value) { XrHandMeshIndexBufferMSFT.nindexCountOutput(address(), value); return this; } - /** Sets the address of the specified {@link IntBuffer} to the {@code indices} field. */ - public Buffer indices(@NativeType("uint32_t *") IntBuffer value) { XrHandMeshIndexBufferMSFT.nindices(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandMeshMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandMeshMSFT.java deleted file mode 100644 index b61925ac..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandMeshMSFT.java +++ /dev/null @@ -1,405 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrHandMeshMSFT {
- *     XrStructureType type;
- *     void * next;
- *     XrBool32 isActive;
- *     XrBool32 indexBufferChanged;
- *     XrBool32 vertexBufferChanged;
- *     {@link XrHandMeshIndexBufferMSFT XrHandMeshIndexBufferMSFT} indexBuffer;
- *     {@link XrHandMeshVertexBufferMSFT XrHandMeshVertexBufferMSFT} vertexBuffer;
- * }
- */ -public class XrHandMeshMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - ISACTIVE, - INDEXBUFFERCHANGED, - VERTEXBUFFERCHANGED, - INDEXBUFFER, - VERTEXBUFFER; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(4), - __member(4), - __member(XrHandMeshIndexBufferMSFT.SIZEOF, XrHandMeshIndexBufferMSFT.ALIGNOF), - __member(XrHandMeshVertexBufferMSFT.SIZEOF, XrHandMeshVertexBufferMSFT.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - ISACTIVE = layout.offsetof(2); - INDEXBUFFERCHANGED = layout.offsetof(3); - VERTEXBUFFERCHANGED = layout.offsetof(4); - INDEXBUFFER = layout.offsetof(5); - VERTEXBUFFER = layout.offsetof(6); - } - - /** - * Creates a {@code XrHandMeshMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrHandMeshMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return the value of the {@code isActive} field. */ - @NativeType("XrBool32") - public boolean isActive() { return nisActive(address()) != 0; } - /** @return the value of the {@code indexBufferChanged} field. */ - @NativeType("XrBool32") - public boolean indexBufferChanged() { return nindexBufferChanged(address()) != 0; } - /** @return the value of the {@code vertexBufferChanged} field. */ - @NativeType("XrBool32") - public boolean vertexBufferChanged() { return nvertexBufferChanged(address()) != 0; } - /** @return a {@link XrHandMeshIndexBufferMSFT} view of the {@code indexBuffer} field. */ - public XrHandMeshIndexBufferMSFT indexBuffer() { return nindexBuffer(address()); } - /** @return a {@link XrHandMeshVertexBufferMSFT} view of the {@code vertexBuffer} field. */ - public XrHandMeshVertexBufferMSFT vertexBuffer() { return nvertexBuffer(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrHandMeshMSFT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link MSFTHandTrackingMesh#XR_TYPE_HAND_MESH_MSFT TYPE_HAND_MESH_MSFT} value to the {@code type} field. */ - public XrHandMeshMSFT type$Default() { return type(MSFTHandTrackingMesh.XR_TYPE_HAND_MESH_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public XrHandMeshMSFT next(@NativeType("void *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code isActive} field. */ - public XrHandMeshMSFT isActive(@NativeType("XrBool32") boolean value) { nisActive(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@code indexBufferChanged} field. */ - public XrHandMeshMSFT indexBufferChanged(@NativeType("XrBool32") boolean value) { nindexBufferChanged(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@code vertexBufferChanged} field. */ - public XrHandMeshMSFT vertexBufferChanged(@NativeType("XrBool32") boolean value) { nvertexBufferChanged(address(), value ? 1 : 0); return this; } - /** Copies the specified {@link XrHandMeshIndexBufferMSFT} to the {@code indexBuffer} field. */ - public XrHandMeshMSFT indexBuffer(XrHandMeshIndexBufferMSFT value) { nindexBuffer(address(), value); return this; } - /** Passes the {@code indexBuffer} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrHandMeshMSFT indexBuffer(java.util.function.Consumer consumer) { consumer.accept(indexBuffer()); return this; } - /** Copies the specified {@link XrHandMeshVertexBufferMSFT} to the {@code vertexBuffer} field. */ - public XrHandMeshMSFT vertexBuffer(XrHandMeshVertexBufferMSFT value) { nvertexBuffer(address(), value); return this; } - /** Passes the {@code vertexBuffer} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrHandMeshMSFT vertexBuffer(java.util.function.Consumer consumer) { consumer.accept(vertexBuffer()); return this; } - - /** Initializes this struct with the specified values. */ - public XrHandMeshMSFT set( - int type, - long next, - boolean isActive, - boolean indexBufferChanged, - boolean vertexBufferChanged, - XrHandMeshIndexBufferMSFT indexBuffer, - XrHandMeshVertexBufferMSFT vertexBuffer - ) { - type(type); - next(next); - isActive(isActive); - indexBufferChanged(indexBufferChanged); - vertexBufferChanged(vertexBufferChanged); - indexBuffer(indexBuffer); - vertexBuffer(vertexBuffer); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrHandMeshMSFT set(XrHandMeshMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrHandMeshMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrHandMeshMSFT malloc() { - return wrap(XrHandMeshMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrHandMeshMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrHandMeshMSFT calloc() { - return wrap(XrHandMeshMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrHandMeshMSFT} instance allocated with {@link BufferUtils}. */ - public static XrHandMeshMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrHandMeshMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrHandMeshMSFT} instance for the specified memory address. */ - public static XrHandMeshMSFT create(long address) { - return wrap(XrHandMeshMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrHandMeshMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrHandMeshMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrHandMeshMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrHandMeshMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrHandMeshMSFT malloc(MemoryStack stack) { - return wrap(XrHandMeshMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrHandMeshMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrHandMeshMSFT calloc(MemoryStack stack) { - return wrap(XrHandMeshMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrHandMeshMSFT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrHandMeshMSFT.NEXT); } - /** Unsafe version of {@link #isActive}. */ - public static int nisActive(long struct) { return UNSAFE.getInt(null, struct + XrHandMeshMSFT.ISACTIVE); } - /** Unsafe version of {@link #indexBufferChanged}. */ - public static int nindexBufferChanged(long struct) { return UNSAFE.getInt(null, struct + XrHandMeshMSFT.INDEXBUFFERCHANGED); } - /** Unsafe version of {@link #vertexBufferChanged}. */ - public static int nvertexBufferChanged(long struct) { return UNSAFE.getInt(null, struct + XrHandMeshMSFT.VERTEXBUFFERCHANGED); } - /** Unsafe version of {@link #indexBuffer}. */ - public static XrHandMeshIndexBufferMSFT nindexBuffer(long struct) { return XrHandMeshIndexBufferMSFT.create(struct + XrHandMeshMSFT.INDEXBUFFER); } - /** Unsafe version of {@link #vertexBuffer}. */ - public static XrHandMeshVertexBufferMSFT nvertexBuffer(long struct) { return XrHandMeshVertexBufferMSFT.create(struct + XrHandMeshMSFT.VERTEXBUFFER); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrHandMeshMSFT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrHandMeshMSFT.NEXT, value); } - /** Unsafe version of {@link #isActive(boolean) isActive}. */ - public static void nisActive(long struct, int value) { UNSAFE.putInt(null, struct + XrHandMeshMSFT.ISACTIVE, value); } - /** Unsafe version of {@link #indexBufferChanged(boolean) indexBufferChanged}. */ - public static void nindexBufferChanged(long struct, int value) { UNSAFE.putInt(null, struct + XrHandMeshMSFT.INDEXBUFFERCHANGED, value); } - /** Unsafe version of {@link #vertexBufferChanged(boolean) vertexBufferChanged}. */ - public static void nvertexBufferChanged(long struct, int value) { UNSAFE.putInt(null, struct + XrHandMeshMSFT.VERTEXBUFFERCHANGED, value); } - /** Unsafe version of {@link #indexBuffer(XrHandMeshIndexBufferMSFT) indexBuffer}. */ - public static void nindexBuffer(long struct, XrHandMeshIndexBufferMSFT value) { memCopy(value.address(), struct + XrHandMeshMSFT.INDEXBUFFER, XrHandMeshIndexBufferMSFT.SIZEOF); } - /** Unsafe version of {@link #vertexBuffer(XrHandMeshVertexBufferMSFT) vertexBuffer}. */ - public static void nvertexBuffer(long struct, XrHandMeshVertexBufferMSFT value) { memCopy(value.address(), struct + XrHandMeshMSFT.VERTEXBUFFER, XrHandMeshVertexBufferMSFT.SIZEOF); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - XrHandMeshIndexBufferMSFT.validate(struct + XrHandMeshMSFT.INDEXBUFFER); - XrHandMeshVertexBufferMSFT.validate(struct + XrHandMeshMSFT.VERTEXBUFFER); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrHandMeshMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrHandMeshMSFT ELEMENT_FACTORY = XrHandMeshMSFT.create(-1L); - - /** - * Creates a new {@code XrHandMeshMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrHandMeshMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrHandMeshMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrHandMeshMSFT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrHandMeshMSFT.nnext(address()); } - /** @return the value of the {@code isActive} field. */ - @NativeType("XrBool32") - public boolean isActive() { return XrHandMeshMSFT.nisActive(address()) != 0; } - /** @return the value of the {@code indexBufferChanged} field. */ - @NativeType("XrBool32") - public boolean indexBufferChanged() { return XrHandMeshMSFT.nindexBufferChanged(address()) != 0; } - /** @return the value of the {@code vertexBufferChanged} field. */ - @NativeType("XrBool32") - public boolean vertexBufferChanged() { return XrHandMeshMSFT.nvertexBufferChanged(address()) != 0; } - /** @return a {@link XrHandMeshIndexBufferMSFT} view of the {@code indexBuffer} field. */ - public XrHandMeshIndexBufferMSFT indexBuffer() { return XrHandMeshMSFT.nindexBuffer(address()); } - /** @return a {@link XrHandMeshVertexBufferMSFT} view of the {@code vertexBuffer} field. */ - public XrHandMeshVertexBufferMSFT vertexBuffer() { return XrHandMeshMSFT.nvertexBuffer(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrHandMeshMSFT.ntype(address(), value); return this; } - /** Sets the {@link MSFTHandTrackingMesh#XR_TYPE_HAND_MESH_MSFT TYPE_HAND_MESH_MSFT} value to the {@code type} field. */ - public Buffer type$Default() { return type(MSFTHandTrackingMesh.XR_TYPE_HAND_MESH_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrHandMeshMSFT.nnext(address(), value); return this; } - /** Sets the specified value to the {@code isActive} field. */ - public Buffer isActive(@NativeType("XrBool32") boolean value) { XrHandMeshMSFT.nisActive(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@code indexBufferChanged} field. */ - public Buffer indexBufferChanged(@NativeType("XrBool32") boolean value) { XrHandMeshMSFT.nindexBufferChanged(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@code vertexBufferChanged} field. */ - public Buffer vertexBufferChanged(@NativeType("XrBool32") boolean value) { XrHandMeshMSFT.nvertexBufferChanged(address(), value ? 1 : 0); return this; } - /** Copies the specified {@link XrHandMeshIndexBufferMSFT} to the {@code indexBuffer} field. */ - public Buffer indexBuffer(XrHandMeshIndexBufferMSFT value) { XrHandMeshMSFT.nindexBuffer(address(), value); return this; } - /** Passes the {@code indexBuffer} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer indexBuffer(java.util.function.Consumer consumer) { consumer.accept(indexBuffer()); return this; } - /** Copies the specified {@link XrHandMeshVertexBufferMSFT} to the {@code vertexBuffer} field. */ - public Buffer vertexBuffer(XrHandMeshVertexBufferMSFT value) { XrHandMeshMSFT.nvertexBuffer(address(), value); return this; } - /** Passes the {@code vertexBuffer} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer vertexBuffer(java.util.function.Consumer consumer) { consumer.accept(vertexBuffer()); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandMeshSpaceCreateInfoMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandMeshSpaceCreateInfoMSFT.java deleted file mode 100644 index 98f3784b..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandMeshSpaceCreateInfoMSFT.java +++ /dev/null @@ -1,321 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrHandMeshSpaceCreateInfoMSFT {
- *     XrStructureType type;
- *     void const * next;
- *     XrHandPoseTypeMSFT handPoseType;
- *     {@link XrPosef XrPosef} poseInHandMeshSpace;
- * }
- */ -public class XrHandMeshSpaceCreateInfoMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - HANDPOSETYPE, - POSEINHANDMESHSPACE; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(XrPosef.SIZEOF, XrPosef.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - HANDPOSETYPE = layout.offsetof(2); - POSEINHANDMESHSPACE = layout.offsetof(3); - } - - /** - * Creates a {@code XrHandMeshSpaceCreateInfoMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrHandMeshSpaceCreateInfoMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code handPoseType} field. */ - @NativeType("XrHandPoseTypeMSFT") - public int handPoseType() { return nhandPoseType(address()); } - /** @return a {@link XrPosef} view of the {@code poseInHandMeshSpace} field. */ - public XrPosef poseInHandMeshSpace() { return nposeInHandMeshSpace(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrHandMeshSpaceCreateInfoMSFT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link MSFTHandTrackingMesh#XR_TYPE_HAND_MESH_SPACE_CREATE_INFO_MSFT TYPE_HAND_MESH_SPACE_CREATE_INFO_MSFT} value to the {@code type} field. */ - public XrHandMeshSpaceCreateInfoMSFT type$Default() { return type(MSFTHandTrackingMesh.XR_TYPE_HAND_MESH_SPACE_CREATE_INFO_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public XrHandMeshSpaceCreateInfoMSFT next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code handPoseType} field. */ - public XrHandMeshSpaceCreateInfoMSFT handPoseType(@NativeType("XrHandPoseTypeMSFT") int value) { nhandPoseType(address(), value); return this; } - /** Copies the specified {@link XrPosef} to the {@code poseInHandMeshSpace} field. */ - public XrHandMeshSpaceCreateInfoMSFT poseInHandMeshSpace(XrPosef value) { nposeInHandMeshSpace(address(), value); return this; } - /** Passes the {@code poseInHandMeshSpace} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrHandMeshSpaceCreateInfoMSFT poseInHandMeshSpace(java.util.function.Consumer consumer) { consumer.accept(poseInHandMeshSpace()); return this; } - - /** Initializes this struct with the specified values. */ - public XrHandMeshSpaceCreateInfoMSFT set( - int type, - long next, - int handPoseType, - XrPosef poseInHandMeshSpace - ) { - type(type); - next(next); - handPoseType(handPoseType); - poseInHandMeshSpace(poseInHandMeshSpace); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrHandMeshSpaceCreateInfoMSFT set(XrHandMeshSpaceCreateInfoMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrHandMeshSpaceCreateInfoMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrHandMeshSpaceCreateInfoMSFT malloc() { - return wrap(XrHandMeshSpaceCreateInfoMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrHandMeshSpaceCreateInfoMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrHandMeshSpaceCreateInfoMSFT calloc() { - return wrap(XrHandMeshSpaceCreateInfoMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrHandMeshSpaceCreateInfoMSFT} instance allocated with {@link BufferUtils}. */ - public static XrHandMeshSpaceCreateInfoMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrHandMeshSpaceCreateInfoMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrHandMeshSpaceCreateInfoMSFT} instance for the specified memory address. */ - public static XrHandMeshSpaceCreateInfoMSFT create(long address) { - return wrap(XrHandMeshSpaceCreateInfoMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrHandMeshSpaceCreateInfoMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrHandMeshSpaceCreateInfoMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrHandMeshSpaceCreateInfoMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrHandMeshSpaceCreateInfoMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrHandMeshSpaceCreateInfoMSFT malloc(MemoryStack stack) { - return wrap(XrHandMeshSpaceCreateInfoMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrHandMeshSpaceCreateInfoMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrHandMeshSpaceCreateInfoMSFT calloc(MemoryStack stack) { - return wrap(XrHandMeshSpaceCreateInfoMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrHandMeshSpaceCreateInfoMSFT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrHandMeshSpaceCreateInfoMSFT.NEXT); } - /** Unsafe version of {@link #handPoseType}. */ - public static int nhandPoseType(long struct) { return UNSAFE.getInt(null, struct + XrHandMeshSpaceCreateInfoMSFT.HANDPOSETYPE); } - /** Unsafe version of {@link #poseInHandMeshSpace}. */ - public static XrPosef nposeInHandMeshSpace(long struct) { return XrPosef.create(struct + XrHandMeshSpaceCreateInfoMSFT.POSEINHANDMESHSPACE); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrHandMeshSpaceCreateInfoMSFT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrHandMeshSpaceCreateInfoMSFT.NEXT, value); } - /** Unsafe version of {@link #handPoseType(int) handPoseType}. */ - public static void nhandPoseType(long struct, int value) { UNSAFE.putInt(null, struct + XrHandMeshSpaceCreateInfoMSFT.HANDPOSETYPE, value); } - /** Unsafe version of {@link #poseInHandMeshSpace(XrPosef) poseInHandMeshSpace}. */ - public static void nposeInHandMeshSpace(long struct, XrPosef value) { memCopy(value.address(), struct + XrHandMeshSpaceCreateInfoMSFT.POSEINHANDMESHSPACE, XrPosef.SIZEOF); } - - // ----------------------------------- - - /** An array of {@link XrHandMeshSpaceCreateInfoMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrHandMeshSpaceCreateInfoMSFT ELEMENT_FACTORY = XrHandMeshSpaceCreateInfoMSFT.create(-1L); - - /** - * Creates a new {@code XrHandMeshSpaceCreateInfoMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrHandMeshSpaceCreateInfoMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrHandMeshSpaceCreateInfoMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrHandMeshSpaceCreateInfoMSFT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrHandMeshSpaceCreateInfoMSFT.nnext(address()); } - /** @return the value of the {@code handPoseType} field. */ - @NativeType("XrHandPoseTypeMSFT") - public int handPoseType() { return XrHandMeshSpaceCreateInfoMSFT.nhandPoseType(address()); } - /** @return a {@link XrPosef} view of the {@code poseInHandMeshSpace} field. */ - public XrPosef poseInHandMeshSpace() { return XrHandMeshSpaceCreateInfoMSFT.nposeInHandMeshSpace(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrHandMeshSpaceCreateInfoMSFT.ntype(address(), value); return this; } - /** Sets the {@link MSFTHandTrackingMesh#XR_TYPE_HAND_MESH_SPACE_CREATE_INFO_MSFT TYPE_HAND_MESH_SPACE_CREATE_INFO_MSFT} value to the {@code type} field. */ - public Buffer type$Default() { return type(MSFTHandTrackingMesh.XR_TYPE_HAND_MESH_SPACE_CREATE_INFO_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrHandMeshSpaceCreateInfoMSFT.nnext(address(), value); return this; } - /** Sets the specified value to the {@code handPoseType} field. */ - public Buffer handPoseType(@NativeType("XrHandPoseTypeMSFT") int value) { XrHandMeshSpaceCreateInfoMSFT.nhandPoseType(address(), value); return this; } - /** Copies the specified {@link XrPosef} to the {@code poseInHandMeshSpace} field. */ - public Buffer poseInHandMeshSpace(XrPosef value) { XrHandMeshSpaceCreateInfoMSFT.nposeInHandMeshSpace(address(), value); return this; } - /** Passes the {@code poseInHandMeshSpace} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer poseInHandMeshSpace(java.util.function.Consumer consumer) { consumer.accept(poseInHandMeshSpace()); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandMeshUpdateInfoMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandMeshUpdateInfoMSFT.java deleted file mode 100644 index 590dba7d..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandMeshUpdateInfoMSFT.java +++ /dev/null @@ -1,319 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrHandMeshUpdateInfoMSFT {
- *     XrStructureType type;
- *     void const * next;
- *     XrTime time;
- *     XrHandPoseTypeMSFT handPoseType;
- * }
- */ -public class XrHandMeshUpdateInfoMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - TIME, - HANDPOSETYPE; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(8), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - TIME = layout.offsetof(2); - HANDPOSETYPE = layout.offsetof(3); - } - - /** - * Creates a {@code XrHandMeshUpdateInfoMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrHandMeshUpdateInfoMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code time} field. */ - @NativeType("XrTime") - public long time() { return ntime(address()); } - /** @return the value of the {@code handPoseType} field. */ - @NativeType("XrHandPoseTypeMSFT") - public int handPoseType() { return nhandPoseType(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrHandMeshUpdateInfoMSFT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link MSFTHandTrackingMesh#XR_TYPE_HAND_MESH_UPDATE_INFO_MSFT TYPE_HAND_MESH_UPDATE_INFO_MSFT} value to the {@code type} field. */ - public XrHandMeshUpdateInfoMSFT type$Default() { return type(MSFTHandTrackingMesh.XR_TYPE_HAND_MESH_UPDATE_INFO_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public XrHandMeshUpdateInfoMSFT next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code time} field. */ - public XrHandMeshUpdateInfoMSFT time(@NativeType("XrTime") long value) { ntime(address(), value); return this; } - /** Sets the specified value to the {@code handPoseType} field. */ - public XrHandMeshUpdateInfoMSFT handPoseType(@NativeType("XrHandPoseTypeMSFT") int value) { nhandPoseType(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrHandMeshUpdateInfoMSFT set( - int type, - long next, - long time, - int handPoseType - ) { - type(type); - next(next); - time(time); - handPoseType(handPoseType); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrHandMeshUpdateInfoMSFT set(XrHandMeshUpdateInfoMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrHandMeshUpdateInfoMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrHandMeshUpdateInfoMSFT malloc() { - return wrap(XrHandMeshUpdateInfoMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrHandMeshUpdateInfoMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrHandMeshUpdateInfoMSFT calloc() { - return wrap(XrHandMeshUpdateInfoMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrHandMeshUpdateInfoMSFT} instance allocated with {@link BufferUtils}. */ - public static XrHandMeshUpdateInfoMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrHandMeshUpdateInfoMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrHandMeshUpdateInfoMSFT} instance for the specified memory address. */ - public static XrHandMeshUpdateInfoMSFT create(long address) { - return wrap(XrHandMeshUpdateInfoMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrHandMeshUpdateInfoMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrHandMeshUpdateInfoMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrHandMeshUpdateInfoMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrHandMeshUpdateInfoMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrHandMeshUpdateInfoMSFT malloc(MemoryStack stack) { - return wrap(XrHandMeshUpdateInfoMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrHandMeshUpdateInfoMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrHandMeshUpdateInfoMSFT calloc(MemoryStack stack) { - return wrap(XrHandMeshUpdateInfoMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrHandMeshUpdateInfoMSFT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrHandMeshUpdateInfoMSFT.NEXT); } - /** Unsafe version of {@link #time}. */ - public static long ntime(long struct) { return UNSAFE.getLong(null, struct + XrHandMeshUpdateInfoMSFT.TIME); } - /** Unsafe version of {@link #handPoseType}. */ - public static int nhandPoseType(long struct) { return UNSAFE.getInt(null, struct + XrHandMeshUpdateInfoMSFT.HANDPOSETYPE); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrHandMeshUpdateInfoMSFT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrHandMeshUpdateInfoMSFT.NEXT, value); } - /** Unsafe version of {@link #time(long) time}. */ - public static void ntime(long struct, long value) { UNSAFE.putLong(null, struct + XrHandMeshUpdateInfoMSFT.TIME, value); } - /** Unsafe version of {@link #handPoseType(int) handPoseType}. */ - public static void nhandPoseType(long struct, int value) { UNSAFE.putInt(null, struct + XrHandMeshUpdateInfoMSFT.HANDPOSETYPE, value); } - - // ----------------------------------- - - /** An array of {@link XrHandMeshUpdateInfoMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrHandMeshUpdateInfoMSFT ELEMENT_FACTORY = XrHandMeshUpdateInfoMSFT.create(-1L); - - /** - * Creates a new {@code XrHandMeshUpdateInfoMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrHandMeshUpdateInfoMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrHandMeshUpdateInfoMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrHandMeshUpdateInfoMSFT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrHandMeshUpdateInfoMSFT.nnext(address()); } - /** @return the value of the {@code time} field. */ - @NativeType("XrTime") - public long time() { return XrHandMeshUpdateInfoMSFT.ntime(address()); } - /** @return the value of the {@code handPoseType} field. */ - @NativeType("XrHandPoseTypeMSFT") - public int handPoseType() { return XrHandMeshUpdateInfoMSFT.nhandPoseType(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrHandMeshUpdateInfoMSFT.ntype(address(), value); return this; } - /** Sets the {@link MSFTHandTrackingMesh#XR_TYPE_HAND_MESH_UPDATE_INFO_MSFT TYPE_HAND_MESH_UPDATE_INFO_MSFT} value to the {@code type} field. */ - public Buffer type$Default() { return type(MSFTHandTrackingMesh.XR_TYPE_HAND_MESH_UPDATE_INFO_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrHandMeshUpdateInfoMSFT.nnext(address(), value); return this; } - /** Sets the specified value to the {@code time} field. */ - public Buffer time(@NativeType("XrTime") long value) { XrHandMeshUpdateInfoMSFT.ntime(address(), value); return this; } - /** Sets the specified value to the {@code handPoseType} field. */ - public Buffer handPoseType(@NativeType("XrHandPoseTypeMSFT") int value) { XrHandMeshUpdateInfoMSFT.nhandPoseType(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandMeshVertexBufferMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandMeshVertexBufferMSFT.java deleted file mode 100644 index 7b397cc1..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandMeshVertexBufferMSFT.java +++ /dev/null @@ -1,331 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrHandMeshVertexBufferMSFT {
- *     XrTime vertexUpdateTime;
- *     uint32_t vertexCapacityInput;
- *     uint32_t vertexCountOutput;
- *     {@link XrHandMeshVertexMSFT XrHandMeshVertexMSFT} * vertices;
- * }
- */ -public class XrHandMeshVertexBufferMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - VERTEXUPDATETIME, - VERTEXCAPACITYINPUT, - VERTEXCOUNTOUTPUT, - VERTICES; - - static { - Layout layout = __struct( - __member(8), - __member(4), - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - VERTEXUPDATETIME = layout.offsetof(0); - VERTEXCAPACITYINPUT = layout.offsetof(1); - VERTEXCOUNTOUTPUT = layout.offsetof(2); - VERTICES = layout.offsetof(3); - } - - /** - * Creates a {@code XrHandMeshVertexBufferMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrHandMeshVertexBufferMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code vertexUpdateTime} field. */ - @NativeType("XrTime") - public long vertexUpdateTime() { return nvertexUpdateTime(address()); } - /** @return the value of the {@code vertexCapacityInput} field. */ - @NativeType("uint32_t") - public int vertexCapacityInput() { return nvertexCapacityInput(address()); } - /** @return the value of the {@code vertexCountOutput} field. */ - @NativeType("uint32_t") - public int vertexCountOutput() { return nvertexCountOutput(address()); } - /** @return a {@link XrHandMeshVertexMSFT.Buffer} view of the struct array pointed to by the {@code vertices} field. */ - @NativeType("XrHandMeshVertexMSFT *") - public XrHandMeshVertexMSFT.Buffer vertices() { return nvertices(address()); } - - /** Sets the specified value to the {@code vertexUpdateTime} field. */ - public XrHandMeshVertexBufferMSFT vertexUpdateTime(@NativeType("XrTime") long value) { nvertexUpdateTime(address(), value); return this; } - /** Sets the specified value to the {@code vertexCountOutput} field. */ - public XrHandMeshVertexBufferMSFT vertexCountOutput(@NativeType("uint32_t") int value) { nvertexCountOutput(address(), value); return this; } - /** Sets the address of the specified {@link XrHandMeshVertexMSFT.Buffer} to the {@code vertices} field. */ - public XrHandMeshVertexBufferMSFT vertices(@NativeType("XrHandMeshVertexMSFT *") XrHandMeshVertexMSFT.Buffer value) { nvertices(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrHandMeshVertexBufferMSFT set( - long vertexUpdateTime, - int vertexCountOutput, - XrHandMeshVertexMSFT.Buffer vertices - ) { - vertexUpdateTime(vertexUpdateTime); - vertexCountOutput(vertexCountOutput); - vertices(vertices); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrHandMeshVertexBufferMSFT set(XrHandMeshVertexBufferMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrHandMeshVertexBufferMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrHandMeshVertexBufferMSFT malloc() { - return wrap(XrHandMeshVertexBufferMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrHandMeshVertexBufferMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrHandMeshVertexBufferMSFT calloc() { - return wrap(XrHandMeshVertexBufferMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrHandMeshVertexBufferMSFT} instance allocated with {@link BufferUtils}. */ - public static XrHandMeshVertexBufferMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrHandMeshVertexBufferMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrHandMeshVertexBufferMSFT} instance for the specified memory address. */ - public static XrHandMeshVertexBufferMSFT create(long address) { - return wrap(XrHandMeshVertexBufferMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrHandMeshVertexBufferMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrHandMeshVertexBufferMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrHandMeshVertexBufferMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrHandMeshVertexBufferMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrHandMeshVertexBufferMSFT malloc(MemoryStack stack) { - return wrap(XrHandMeshVertexBufferMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrHandMeshVertexBufferMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrHandMeshVertexBufferMSFT calloc(MemoryStack stack) { - return wrap(XrHandMeshVertexBufferMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #vertexUpdateTime}. */ - public static long nvertexUpdateTime(long struct) { return UNSAFE.getLong(null, struct + XrHandMeshVertexBufferMSFT.VERTEXUPDATETIME); } - /** Unsafe version of {@link #vertexCapacityInput}. */ - public static int nvertexCapacityInput(long struct) { return UNSAFE.getInt(null, struct + XrHandMeshVertexBufferMSFT.VERTEXCAPACITYINPUT); } - /** Unsafe version of {@link #vertexCountOutput}. */ - public static int nvertexCountOutput(long struct) { return UNSAFE.getInt(null, struct + XrHandMeshVertexBufferMSFT.VERTEXCOUNTOUTPUT); } - /** Unsafe version of {@link #vertices}. */ - public static XrHandMeshVertexMSFT.Buffer nvertices(long struct) { return XrHandMeshVertexMSFT.create(memGetAddress(struct + XrHandMeshVertexBufferMSFT.VERTICES), nvertexCapacityInput(struct)); } - - /** Unsafe version of {@link #vertexUpdateTime(long) vertexUpdateTime}. */ - public static void nvertexUpdateTime(long struct, long value) { UNSAFE.putLong(null, struct + XrHandMeshVertexBufferMSFT.VERTEXUPDATETIME, value); } - /** Sets the specified value to the {@code vertexCapacityInput} field of the specified {@code struct}. */ - public static void nvertexCapacityInput(long struct, int value) { UNSAFE.putInt(null, struct + XrHandMeshVertexBufferMSFT.VERTEXCAPACITYINPUT, value); } - /** Unsafe version of {@link #vertexCountOutput(int) vertexCountOutput}. */ - public static void nvertexCountOutput(long struct, int value) { UNSAFE.putInt(null, struct + XrHandMeshVertexBufferMSFT.VERTEXCOUNTOUTPUT, value); } - /** Unsafe version of {@link #vertices(XrHandMeshVertexMSFT.Buffer) vertices}. */ - public static void nvertices(long struct, XrHandMeshVertexMSFT.Buffer value) { memPutAddress(struct + XrHandMeshVertexBufferMSFT.VERTICES, value.address()); nvertexCapacityInput(struct, value.remaining()); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XrHandMeshVertexBufferMSFT.VERTICES)); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrHandMeshVertexBufferMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrHandMeshVertexBufferMSFT ELEMENT_FACTORY = XrHandMeshVertexBufferMSFT.create(-1L); - - /** - * Creates a new {@code XrHandMeshVertexBufferMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrHandMeshVertexBufferMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrHandMeshVertexBufferMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code vertexUpdateTime} field. */ - @NativeType("XrTime") - public long vertexUpdateTime() { return XrHandMeshVertexBufferMSFT.nvertexUpdateTime(address()); } - /** @return the value of the {@code vertexCapacityInput} field. */ - @NativeType("uint32_t") - public int vertexCapacityInput() { return XrHandMeshVertexBufferMSFT.nvertexCapacityInput(address()); } - /** @return the value of the {@code vertexCountOutput} field. */ - @NativeType("uint32_t") - public int vertexCountOutput() { return XrHandMeshVertexBufferMSFT.nvertexCountOutput(address()); } - /** @return a {@link XrHandMeshVertexMSFT.Buffer} view of the struct array pointed to by the {@code vertices} field. */ - @NativeType("XrHandMeshVertexMSFT *") - public XrHandMeshVertexMSFT.Buffer vertices() { return XrHandMeshVertexBufferMSFT.nvertices(address()); } - - /** Sets the specified value to the {@code vertexUpdateTime} field. */ - public Buffer vertexUpdateTime(@NativeType("XrTime") long value) { XrHandMeshVertexBufferMSFT.nvertexUpdateTime(address(), value); return this; } - /** Sets the specified value to the {@code vertexCountOutput} field. */ - public Buffer vertexCountOutput(@NativeType("uint32_t") int value) { XrHandMeshVertexBufferMSFT.nvertexCountOutput(address(), value); return this; } - /** Sets the address of the specified {@link XrHandMeshVertexMSFT.Buffer} to the {@code vertices} field. */ - public Buffer vertices(@NativeType("XrHandMeshVertexMSFT *") XrHandMeshVertexMSFT.Buffer value) { XrHandMeshVertexBufferMSFT.nvertices(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandMeshVertexMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandMeshVertexMSFT.java deleted file mode 100644 index 8d22eb84..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandMeshVertexMSFT.java +++ /dev/null @@ -1,279 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrHandMeshVertexMSFT {
- *     {@link XrVector3f XrVector3f} position;
- *     {@link XrVector3f XrVector3f} normal;
- * }
- */ -public class XrHandMeshVertexMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - POSITION, - NORMAL; - - static { - Layout layout = __struct( - __member(XrVector3f.SIZEOF, XrVector3f.ALIGNOF), - __member(XrVector3f.SIZEOF, XrVector3f.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - POSITION = layout.offsetof(0); - NORMAL = layout.offsetof(1); - } - - /** - * Creates a {@code XrHandMeshVertexMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrHandMeshVertexMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return a {@link XrVector3f} view of the {@code position} field. */ - public XrVector3f position$() { return nposition$(address()); } - /** @return a {@link XrVector3f} view of the {@code normal} field. */ - public XrVector3f normal() { return nnormal(address()); } - - /** Copies the specified {@link XrVector3f} to the {@code position} field. */ - public XrHandMeshVertexMSFT position$(XrVector3f value) { nposition$(address(), value); return this; } - /** Passes the {@code position} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrHandMeshVertexMSFT position$(java.util.function.Consumer consumer) { consumer.accept(position$()); return this; } - /** Copies the specified {@link XrVector3f} to the {@code normal} field. */ - public XrHandMeshVertexMSFT normal(XrVector3f value) { nnormal(address(), value); return this; } - /** Passes the {@code normal} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrHandMeshVertexMSFT normal(java.util.function.Consumer consumer) { consumer.accept(normal()); return this; } - - /** Initializes this struct with the specified values. */ - public XrHandMeshVertexMSFT set( - XrVector3f position$, - XrVector3f normal - ) { - position$(position$); - normal(normal); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrHandMeshVertexMSFT set(XrHandMeshVertexMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrHandMeshVertexMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrHandMeshVertexMSFT malloc() { - return wrap(XrHandMeshVertexMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrHandMeshVertexMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrHandMeshVertexMSFT calloc() { - return wrap(XrHandMeshVertexMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrHandMeshVertexMSFT} instance allocated with {@link BufferUtils}. */ - public static XrHandMeshVertexMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrHandMeshVertexMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrHandMeshVertexMSFT} instance for the specified memory address. */ - public static XrHandMeshVertexMSFT create(long address) { - return wrap(XrHandMeshVertexMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrHandMeshVertexMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrHandMeshVertexMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrHandMeshVertexMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrHandMeshVertexMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrHandMeshVertexMSFT malloc(MemoryStack stack) { - return wrap(XrHandMeshVertexMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrHandMeshVertexMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrHandMeshVertexMSFT calloc(MemoryStack stack) { - return wrap(XrHandMeshVertexMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #position$}. */ - public static XrVector3f nposition$(long struct) { return XrVector3f.create(struct + XrHandMeshVertexMSFT.POSITION); } - /** Unsafe version of {@link #normal}. */ - public static XrVector3f nnormal(long struct) { return XrVector3f.create(struct + XrHandMeshVertexMSFT.NORMAL); } - - /** Unsafe version of {@link #position$(XrVector3f) position$}. */ - public static void nposition$(long struct, XrVector3f value) { memCopy(value.address(), struct + XrHandMeshVertexMSFT.POSITION, XrVector3f.SIZEOF); } - /** Unsafe version of {@link #normal(XrVector3f) normal}. */ - public static void nnormal(long struct, XrVector3f value) { memCopy(value.address(), struct + XrHandMeshVertexMSFT.NORMAL, XrVector3f.SIZEOF); } - - // ----------------------------------- - - /** An array of {@link XrHandMeshVertexMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrHandMeshVertexMSFT ELEMENT_FACTORY = XrHandMeshVertexMSFT.create(-1L); - - /** - * Creates a new {@code XrHandMeshVertexMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrHandMeshVertexMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrHandMeshVertexMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link XrVector3f} view of the {@code position} field. */ - public XrVector3f position$() { return XrHandMeshVertexMSFT.nposition$(address()); } - /** @return a {@link XrVector3f} view of the {@code normal} field. */ - public XrVector3f normal() { return XrHandMeshVertexMSFT.nnormal(address()); } - - /** Copies the specified {@link XrVector3f} to the {@code position} field. */ - public Buffer position$(XrVector3f value) { XrHandMeshVertexMSFT.nposition$(address(), value); return this; } - /** Passes the {@code position} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer position$(java.util.function.Consumer consumer) { consumer.accept(position$()); return this; } - /** Copies the specified {@link XrVector3f} to the {@code normal} field. */ - public Buffer normal(XrVector3f value) { XrHandMeshVertexMSFT.nnormal(address(), value); return this; } - /** Passes the {@code normal} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer normal(java.util.function.Consumer consumer) { consumer.accept(normal()); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandPoseTypeInfoMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandPoseTypeInfoMSFT.java deleted file mode 100644 index 340ab4c2..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandPoseTypeInfoMSFT.java +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrHandPoseTypeInfoMSFT {
- *     XrStructureType type;
- *     void const * next;
- *     XrHandPoseTypeMSFT handPoseType;
- * }
- */ -public class XrHandPoseTypeInfoMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - HANDPOSETYPE; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - HANDPOSETYPE = layout.offsetof(2); - } - - /** - * Creates a {@code XrHandPoseTypeInfoMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrHandPoseTypeInfoMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code handPoseType} field. */ - @NativeType("XrHandPoseTypeMSFT") - public int handPoseType() { return nhandPoseType(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrHandPoseTypeInfoMSFT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link MSFTHandTrackingMesh#XR_TYPE_HAND_POSE_TYPE_INFO_MSFT TYPE_HAND_POSE_TYPE_INFO_MSFT} value to the {@code type} field. */ - public XrHandPoseTypeInfoMSFT type$Default() { return type(MSFTHandTrackingMesh.XR_TYPE_HAND_POSE_TYPE_INFO_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public XrHandPoseTypeInfoMSFT next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code handPoseType} field. */ - public XrHandPoseTypeInfoMSFT handPoseType(@NativeType("XrHandPoseTypeMSFT") int value) { nhandPoseType(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrHandPoseTypeInfoMSFT set( - int type, - long next, - int handPoseType - ) { - type(type); - next(next); - handPoseType(handPoseType); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrHandPoseTypeInfoMSFT set(XrHandPoseTypeInfoMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrHandPoseTypeInfoMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrHandPoseTypeInfoMSFT malloc() { - return wrap(XrHandPoseTypeInfoMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrHandPoseTypeInfoMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrHandPoseTypeInfoMSFT calloc() { - return wrap(XrHandPoseTypeInfoMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrHandPoseTypeInfoMSFT} instance allocated with {@link BufferUtils}. */ - public static XrHandPoseTypeInfoMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrHandPoseTypeInfoMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrHandPoseTypeInfoMSFT} instance for the specified memory address. */ - public static XrHandPoseTypeInfoMSFT create(long address) { - return wrap(XrHandPoseTypeInfoMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrHandPoseTypeInfoMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrHandPoseTypeInfoMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrHandPoseTypeInfoMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrHandPoseTypeInfoMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrHandPoseTypeInfoMSFT malloc(MemoryStack stack) { - return wrap(XrHandPoseTypeInfoMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrHandPoseTypeInfoMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrHandPoseTypeInfoMSFT calloc(MemoryStack stack) { - return wrap(XrHandPoseTypeInfoMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrHandPoseTypeInfoMSFT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrHandPoseTypeInfoMSFT.NEXT); } - /** Unsafe version of {@link #handPoseType}. */ - public static int nhandPoseType(long struct) { return UNSAFE.getInt(null, struct + XrHandPoseTypeInfoMSFT.HANDPOSETYPE); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrHandPoseTypeInfoMSFT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrHandPoseTypeInfoMSFT.NEXT, value); } - /** Unsafe version of {@link #handPoseType(int) handPoseType}. */ - public static void nhandPoseType(long struct, int value) { UNSAFE.putInt(null, struct + XrHandPoseTypeInfoMSFT.HANDPOSETYPE, value); } - - // ----------------------------------- - - /** An array of {@link XrHandPoseTypeInfoMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrHandPoseTypeInfoMSFT ELEMENT_FACTORY = XrHandPoseTypeInfoMSFT.create(-1L); - - /** - * Creates a new {@code XrHandPoseTypeInfoMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrHandPoseTypeInfoMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrHandPoseTypeInfoMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrHandPoseTypeInfoMSFT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrHandPoseTypeInfoMSFT.nnext(address()); } - /** @return the value of the {@code handPoseType} field. */ - @NativeType("XrHandPoseTypeMSFT") - public int handPoseType() { return XrHandPoseTypeInfoMSFT.nhandPoseType(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrHandPoseTypeInfoMSFT.ntype(address(), value); return this; } - /** Sets the {@link MSFTHandTrackingMesh#XR_TYPE_HAND_POSE_TYPE_INFO_MSFT TYPE_HAND_POSE_TYPE_INFO_MSFT} value to the {@code type} field. */ - public Buffer type$Default() { return type(MSFTHandTrackingMesh.XR_TYPE_HAND_POSE_TYPE_INFO_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrHandPoseTypeInfoMSFT.nnext(address(), value); return this; } - /** Sets the specified value to the {@code handPoseType} field. */ - public Buffer handPoseType(@NativeType("XrHandPoseTypeMSFT") int value) { XrHandPoseTypeInfoMSFT.nhandPoseType(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandTrackerCreateInfoEXT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandTrackerCreateInfoEXT.java deleted file mode 100644 index 690968c9..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandTrackerCreateInfoEXT.java +++ /dev/null @@ -1,319 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrHandTrackerCreateInfoEXT {
- *     XrStructureType type;
- *     void const * next;
- *     XrHandEXT hand;
- *     XrHandJointSetEXT handJointSet;
- * }
- */ -public class XrHandTrackerCreateInfoEXT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - HAND, - HANDJOINTSET; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - HAND = layout.offsetof(2); - HANDJOINTSET = layout.offsetof(3); - } - - /** - * Creates a {@code XrHandTrackerCreateInfoEXT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrHandTrackerCreateInfoEXT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code hand} field. */ - @NativeType("XrHandEXT") - public int hand() { return nhand(address()); } - /** @return the value of the {@code handJointSet} field. */ - @NativeType("XrHandJointSetEXT") - public int handJointSet() { return nhandJointSet(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrHandTrackerCreateInfoEXT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link EXTHandTracking#XR_TYPE_HAND_TRACKER_CREATE_INFO_EXT TYPE_HAND_TRACKER_CREATE_INFO_EXT} value to the {@code type} field. */ - public XrHandTrackerCreateInfoEXT type$Default() { return type(EXTHandTracking.XR_TYPE_HAND_TRACKER_CREATE_INFO_EXT); } - /** Sets the specified value to the {@code next} field. */ - public XrHandTrackerCreateInfoEXT next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code hand} field. */ - public XrHandTrackerCreateInfoEXT hand(@NativeType("XrHandEXT") int value) { nhand(address(), value); return this; } - /** Sets the specified value to the {@code handJointSet} field. */ - public XrHandTrackerCreateInfoEXT handJointSet(@NativeType("XrHandJointSetEXT") int value) { nhandJointSet(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrHandTrackerCreateInfoEXT set( - int type, - long next, - int hand, - int handJointSet - ) { - type(type); - next(next); - hand(hand); - handJointSet(handJointSet); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrHandTrackerCreateInfoEXT set(XrHandTrackerCreateInfoEXT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrHandTrackerCreateInfoEXT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrHandTrackerCreateInfoEXT malloc() { - return wrap(XrHandTrackerCreateInfoEXT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrHandTrackerCreateInfoEXT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrHandTrackerCreateInfoEXT calloc() { - return wrap(XrHandTrackerCreateInfoEXT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrHandTrackerCreateInfoEXT} instance allocated with {@link BufferUtils}. */ - public static XrHandTrackerCreateInfoEXT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrHandTrackerCreateInfoEXT.class, memAddress(container), container); - } - - /** Returns a new {@code XrHandTrackerCreateInfoEXT} instance for the specified memory address. */ - public static XrHandTrackerCreateInfoEXT create(long address) { - return wrap(XrHandTrackerCreateInfoEXT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrHandTrackerCreateInfoEXT createSafe(long address) { - return address == NULL ? null : wrap(XrHandTrackerCreateInfoEXT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrHandTrackerCreateInfoEXT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrHandTrackerCreateInfoEXT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrHandTrackerCreateInfoEXT malloc(MemoryStack stack) { - return wrap(XrHandTrackerCreateInfoEXT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrHandTrackerCreateInfoEXT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrHandTrackerCreateInfoEXT calloc(MemoryStack stack) { - return wrap(XrHandTrackerCreateInfoEXT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrHandTrackerCreateInfoEXT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrHandTrackerCreateInfoEXT.NEXT); } - /** Unsafe version of {@link #hand}. */ - public static int nhand(long struct) { return UNSAFE.getInt(null, struct + XrHandTrackerCreateInfoEXT.HAND); } - /** Unsafe version of {@link #handJointSet}. */ - public static int nhandJointSet(long struct) { return UNSAFE.getInt(null, struct + XrHandTrackerCreateInfoEXT.HANDJOINTSET); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrHandTrackerCreateInfoEXT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrHandTrackerCreateInfoEXT.NEXT, value); } - /** Unsafe version of {@link #hand(int) hand}. */ - public static void nhand(long struct, int value) { UNSAFE.putInt(null, struct + XrHandTrackerCreateInfoEXT.HAND, value); } - /** Unsafe version of {@link #handJointSet(int) handJointSet}. */ - public static void nhandJointSet(long struct, int value) { UNSAFE.putInt(null, struct + XrHandTrackerCreateInfoEXT.HANDJOINTSET, value); } - - // ----------------------------------- - - /** An array of {@link XrHandTrackerCreateInfoEXT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrHandTrackerCreateInfoEXT ELEMENT_FACTORY = XrHandTrackerCreateInfoEXT.create(-1L); - - /** - * Creates a new {@code XrHandTrackerCreateInfoEXT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrHandTrackerCreateInfoEXT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrHandTrackerCreateInfoEXT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrHandTrackerCreateInfoEXT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrHandTrackerCreateInfoEXT.nnext(address()); } - /** @return the value of the {@code hand} field. */ - @NativeType("XrHandEXT") - public int hand() { return XrHandTrackerCreateInfoEXT.nhand(address()); } - /** @return the value of the {@code handJointSet} field. */ - @NativeType("XrHandJointSetEXT") - public int handJointSet() { return XrHandTrackerCreateInfoEXT.nhandJointSet(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrHandTrackerCreateInfoEXT.ntype(address(), value); return this; } - /** Sets the {@link EXTHandTracking#XR_TYPE_HAND_TRACKER_CREATE_INFO_EXT TYPE_HAND_TRACKER_CREATE_INFO_EXT} value to the {@code type} field. */ - public Buffer type$Default() { return type(EXTHandTracking.XR_TYPE_HAND_TRACKER_CREATE_INFO_EXT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrHandTrackerCreateInfoEXT.nnext(address(), value); return this; } - /** Sets the specified value to the {@code hand} field. */ - public Buffer hand(@NativeType("XrHandEXT") int value) { XrHandTrackerCreateInfoEXT.nhand(address(), value); return this; } - /** Sets the specified value to the {@code handJointSet} field. */ - public Buffer handJointSet(@NativeType("XrHandJointSetEXT") int value) { XrHandTrackerCreateInfoEXT.nhandJointSet(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandTrackerEXT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandTrackerEXT.java deleted file mode 100644 index a35c0717..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandTrackerEXT.java +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.openxr; - -public class XrHandTrackerEXT extends DispatchableHandle { - public XrHandTrackerEXT(long handle, DispatchableHandle session) { - super(handle, session.getCapabilities()); - } - - public XrHandTrackerEXT(long handle, XRCapabilities capabilities) { - super(handle, capabilities); - } -} diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandTrackingAimStateFB.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandTrackingAimStateFB.java deleted file mode 100644 index c5334693..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandTrackingAimStateFB.java +++ /dev/null @@ -1,341 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrHandTrackingAimStateFB {
- *     XrStructureType type;
- *     void * next;
- *     XrHandTrackingAimFlagsFB status;
- *     {@link XrPosef XrPosef} aimPose;
- *     float pinchStrengthIndex;
- *     float pinchStrengthMiddle;
- *     float pinchStrengthRing;
- *     float pinchStrengthLittle;
- * }
- */ -public class XrHandTrackingAimStateFB extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - STATUS, - AIMPOSE, - PINCHSTRENGTHINDEX, - PINCHSTRENGTHMIDDLE, - PINCHSTRENGTHRING, - PINCHSTRENGTHLITTLE; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(8), - __member(XrPosef.SIZEOF, XrPosef.ALIGNOF), - __member(4), - __member(4), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - STATUS = layout.offsetof(2); - AIMPOSE = layout.offsetof(3); - PINCHSTRENGTHINDEX = layout.offsetof(4); - PINCHSTRENGTHMIDDLE = layout.offsetof(5); - PINCHSTRENGTHRING = layout.offsetof(6); - PINCHSTRENGTHLITTLE = layout.offsetof(7); - } - - /** - * Creates a {@code XrHandTrackingAimStateFB} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrHandTrackingAimStateFB(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return the value of the {@code status} field. */ - @NativeType("XrHandTrackingAimFlagsFB") - public long status() { return nstatus(address()); } - /** @return a {@link XrPosef} view of the {@code aimPose} field. */ - public XrPosef aimPose() { return naimPose(address()); } - /** @return the value of the {@code pinchStrengthIndex} field. */ - public float pinchStrengthIndex() { return npinchStrengthIndex(address()); } - /** @return the value of the {@code pinchStrengthMiddle} field. */ - public float pinchStrengthMiddle() { return npinchStrengthMiddle(address()); } - /** @return the value of the {@code pinchStrengthRing} field. */ - public float pinchStrengthRing() { return npinchStrengthRing(address()); } - /** @return the value of the {@code pinchStrengthLittle} field. */ - public float pinchStrengthLittle() { return npinchStrengthLittle(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrHandTrackingAimStateFB type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link FBHandTrackingAim#XR_TYPE_HAND_TRACKING_AIM_STATE_FB TYPE_HAND_TRACKING_AIM_STATE_FB} value to the {@code type} field. */ - public XrHandTrackingAimStateFB type$Default() { return type(FBHandTrackingAim.XR_TYPE_HAND_TRACKING_AIM_STATE_FB); } - /** Sets the specified value to the {@code next} field. */ - public XrHandTrackingAimStateFB next(@NativeType("void *") long value) { nnext(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrHandTrackingAimStateFB set( - int type, - long next - ) { - type(type); - next(next); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrHandTrackingAimStateFB set(XrHandTrackingAimStateFB src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrHandTrackingAimStateFB} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrHandTrackingAimStateFB malloc() { - return wrap(XrHandTrackingAimStateFB.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrHandTrackingAimStateFB} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrHandTrackingAimStateFB calloc() { - return wrap(XrHandTrackingAimStateFB.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrHandTrackingAimStateFB} instance allocated with {@link BufferUtils}. */ - public static XrHandTrackingAimStateFB create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrHandTrackingAimStateFB.class, memAddress(container), container); - } - - /** Returns a new {@code XrHandTrackingAimStateFB} instance for the specified memory address. */ - public static XrHandTrackingAimStateFB create(long address) { - return wrap(XrHandTrackingAimStateFB.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrHandTrackingAimStateFB createSafe(long address) { - return address == NULL ? null : wrap(XrHandTrackingAimStateFB.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrHandTrackingAimStateFB.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrHandTrackingAimStateFB} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrHandTrackingAimStateFB malloc(MemoryStack stack) { - return wrap(XrHandTrackingAimStateFB.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrHandTrackingAimStateFB} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrHandTrackingAimStateFB calloc(MemoryStack stack) { - return wrap(XrHandTrackingAimStateFB.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrHandTrackingAimStateFB.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrHandTrackingAimStateFB.NEXT); } - /** Unsafe version of {@link #status}. */ - public static long nstatus(long struct) { return UNSAFE.getLong(null, struct + XrHandTrackingAimStateFB.STATUS); } - /** Unsafe version of {@link #aimPose}. */ - public static XrPosef naimPose(long struct) { return XrPosef.create(struct + XrHandTrackingAimStateFB.AIMPOSE); } - /** Unsafe version of {@link #pinchStrengthIndex}. */ - public static float npinchStrengthIndex(long struct) { return UNSAFE.getFloat(null, struct + XrHandTrackingAimStateFB.PINCHSTRENGTHINDEX); } - /** Unsafe version of {@link #pinchStrengthMiddle}. */ - public static float npinchStrengthMiddle(long struct) { return UNSAFE.getFloat(null, struct + XrHandTrackingAimStateFB.PINCHSTRENGTHMIDDLE); } - /** Unsafe version of {@link #pinchStrengthRing}. */ - public static float npinchStrengthRing(long struct) { return UNSAFE.getFloat(null, struct + XrHandTrackingAimStateFB.PINCHSTRENGTHRING); } - /** Unsafe version of {@link #pinchStrengthLittle}. */ - public static float npinchStrengthLittle(long struct) { return UNSAFE.getFloat(null, struct + XrHandTrackingAimStateFB.PINCHSTRENGTHLITTLE); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrHandTrackingAimStateFB.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrHandTrackingAimStateFB.NEXT, value); } - - // ----------------------------------- - - /** An array of {@link XrHandTrackingAimStateFB} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrHandTrackingAimStateFB ELEMENT_FACTORY = XrHandTrackingAimStateFB.create(-1L); - - /** - * Creates a new {@code XrHandTrackingAimStateFB.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrHandTrackingAimStateFB#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrHandTrackingAimStateFB getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrHandTrackingAimStateFB.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrHandTrackingAimStateFB.nnext(address()); } - /** @return the value of the {@code status} field. */ - @NativeType("XrHandTrackingAimFlagsFB") - public long status() { return XrHandTrackingAimStateFB.nstatus(address()); } - /** @return a {@link XrPosef} view of the {@code aimPose} field. */ - public XrPosef aimPose() { return XrHandTrackingAimStateFB.naimPose(address()); } - /** @return the value of the {@code pinchStrengthIndex} field. */ - public float pinchStrengthIndex() { return XrHandTrackingAimStateFB.npinchStrengthIndex(address()); } - /** @return the value of the {@code pinchStrengthMiddle} field. */ - public float pinchStrengthMiddle() { return XrHandTrackingAimStateFB.npinchStrengthMiddle(address()); } - /** @return the value of the {@code pinchStrengthRing} field. */ - public float pinchStrengthRing() { return XrHandTrackingAimStateFB.npinchStrengthRing(address()); } - /** @return the value of the {@code pinchStrengthLittle} field. */ - public float pinchStrengthLittle() { return XrHandTrackingAimStateFB.npinchStrengthLittle(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrHandTrackingAimStateFB.ntype(address(), value); return this; } - /** Sets the {@link FBHandTrackingAim#XR_TYPE_HAND_TRACKING_AIM_STATE_FB TYPE_HAND_TRACKING_AIM_STATE_FB} value to the {@code type} field. */ - public Buffer type$Default() { return type(FBHandTrackingAim.XR_TYPE_HAND_TRACKING_AIM_STATE_FB); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrHandTrackingAimStateFB.nnext(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandTrackingCapsulesStateFB.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandTrackingCapsulesStateFB.java deleted file mode 100644 index 86d7bc37..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandTrackingCapsulesStateFB.java +++ /dev/null @@ -1,301 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.openxr.FBHandTrackingCapsules.XR_FB_HAND_TRACKING_CAPSULE_COUNT; -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrHandTrackingCapsulesStateFB {
- *     XrStructureType type;
- *     void * next;
- *     {@link XrHandCapsuleFB XrHandCapsuleFB} capsules[XR_FB_HAND_TRACKING_CAPSULE_COUNT];
- * }
- */ -public class XrHandTrackingCapsulesStateFB extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - CAPSULES; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __array(XrHandCapsuleFB.SIZEOF, XrHandCapsuleFB.ALIGNOF, XR_FB_HAND_TRACKING_CAPSULE_COUNT) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - CAPSULES = layout.offsetof(2); - } - - /** - * Creates a {@code XrHandTrackingCapsulesStateFB} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrHandTrackingCapsulesStateFB(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return a {@link XrHandCapsuleFB}.Buffer view of the {@code capsules} field. */ - @NativeType("XrHandCapsuleFB[XR_FB_HAND_TRACKING_CAPSULE_COUNT]") - public XrHandCapsuleFB.Buffer capsules() { return ncapsules(address()); } - /** @return a {@link XrHandCapsuleFB} view of the struct at the specified index of the {@code capsules} field. */ - public XrHandCapsuleFB capsules(int index) { return ncapsules(address(), index); } - - /** Sets the specified value to the {@code type} field. */ - public XrHandTrackingCapsulesStateFB type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link FBHandTrackingCapsules#XR_TYPE_HAND_TRACKING_CAPSULES_STATE_FB TYPE_HAND_TRACKING_CAPSULES_STATE_FB} value to the {@code type} field. */ - public XrHandTrackingCapsulesStateFB type$Default() { return type(FBHandTrackingCapsules.XR_TYPE_HAND_TRACKING_CAPSULES_STATE_FB); } - /** Sets the specified value to the {@code next} field. */ - public XrHandTrackingCapsulesStateFB next(@NativeType("void *") long value) { nnext(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrHandTrackingCapsulesStateFB set( - int type, - long next - ) { - type(type); - next(next); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrHandTrackingCapsulesStateFB set(XrHandTrackingCapsulesStateFB src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrHandTrackingCapsulesStateFB} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrHandTrackingCapsulesStateFB malloc() { - return wrap(XrHandTrackingCapsulesStateFB.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrHandTrackingCapsulesStateFB} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrHandTrackingCapsulesStateFB calloc() { - return wrap(XrHandTrackingCapsulesStateFB.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrHandTrackingCapsulesStateFB} instance allocated with {@link BufferUtils}. */ - public static XrHandTrackingCapsulesStateFB create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrHandTrackingCapsulesStateFB.class, memAddress(container), container); - } - - /** Returns a new {@code XrHandTrackingCapsulesStateFB} instance for the specified memory address. */ - public static XrHandTrackingCapsulesStateFB create(long address) { - return wrap(XrHandTrackingCapsulesStateFB.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrHandTrackingCapsulesStateFB createSafe(long address) { - return address == NULL ? null : wrap(XrHandTrackingCapsulesStateFB.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrHandTrackingCapsulesStateFB.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrHandTrackingCapsulesStateFB} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrHandTrackingCapsulesStateFB malloc(MemoryStack stack) { - return wrap(XrHandTrackingCapsulesStateFB.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrHandTrackingCapsulesStateFB} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrHandTrackingCapsulesStateFB calloc(MemoryStack stack) { - return wrap(XrHandTrackingCapsulesStateFB.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrHandTrackingCapsulesStateFB.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrHandTrackingCapsulesStateFB.NEXT); } - /** Unsafe version of {@link #capsules}. */ - public static XrHandCapsuleFB.Buffer ncapsules(long struct) { return XrHandCapsuleFB.create(struct + XrHandTrackingCapsulesStateFB.CAPSULES, XR_FB_HAND_TRACKING_CAPSULE_COUNT); } - /** Unsafe version of {@link #capsules(int) capsules}. */ - public static XrHandCapsuleFB ncapsules(long struct, int index) { - return XrHandCapsuleFB.create(struct + XrHandTrackingCapsulesStateFB.CAPSULES + check(index, XR_FB_HAND_TRACKING_CAPSULE_COUNT) * XrHandCapsuleFB.SIZEOF); - } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrHandTrackingCapsulesStateFB.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrHandTrackingCapsulesStateFB.NEXT, value); } - - // ----------------------------------- - - /** An array of {@link XrHandTrackingCapsulesStateFB} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrHandTrackingCapsulesStateFB ELEMENT_FACTORY = XrHandTrackingCapsulesStateFB.create(-1L); - - /** - * Creates a new {@code XrHandTrackingCapsulesStateFB.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrHandTrackingCapsulesStateFB#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrHandTrackingCapsulesStateFB getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrHandTrackingCapsulesStateFB.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrHandTrackingCapsulesStateFB.nnext(address()); } - /** @return a {@link XrHandCapsuleFB}.Buffer view of the {@code capsules} field. */ - @NativeType("XrHandCapsuleFB[XR_FB_HAND_TRACKING_CAPSULE_COUNT]") - public XrHandCapsuleFB.Buffer capsules() { return XrHandTrackingCapsulesStateFB.ncapsules(address()); } - /** @return a {@link XrHandCapsuleFB} view of the struct at the specified index of the {@code capsules} field. */ - public XrHandCapsuleFB capsules(int index) { return XrHandTrackingCapsulesStateFB.ncapsules(address(), index); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrHandTrackingCapsulesStateFB.ntype(address(), value); return this; } - /** Sets the {@link FBHandTrackingCapsules#XR_TYPE_HAND_TRACKING_CAPSULES_STATE_FB TYPE_HAND_TRACKING_CAPSULES_STATE_FB} value to the {@code type} field. */ - public Buffer type$Default() { return type(FBHandTrackingCapsules.XR_TYPE_HAND_TRACKING_CAPSULES_STATE_FB); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrHandTrackingCapsulesStateFB.nnext(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandTrackingMeshFB.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandTrackingMeshFB.java deleted file mode 100644 index bcde4558..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandTrackingMeshFB.java +++ /dev/null @@ -1,606 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; -import java.nio.FloatBuffer; -import java.nio.IntBuffer; -import java.nio.ShortBuffer; - -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrHandTrackingMeshFB {
- *     XrStructureType type;
- *     void * next;
- *     uint32_t jointCapacityInput;
- *     uint32_t jointCountOutput;
- *     {@link XrPosef XrPosef} * jointBindPoses;
- *     float * jointRadii;
- *     XrHandJointEXT * jointParents;
- *     uint32_t vertexCapacityInput;
- *     uint32_t vertexCountOutput;
- *     {@link XrVector3f XrVector3f} * vertexPositions;
- *     {@link XrVector3f XrVector3f} * vertexNormals;
- *     {@link XrVector2f XrVector2f} * vertexUVs;
- *     {@link XrVector4sFB XrVector4sFB} * vertexBlendIndices;
- *     {@link XrVector4f XrVector4f} * vertexBlendWeights;
- *     uint32_t indexCapacityInput;
- *     uint32_t indexCountOutput;
- *     int16_t * indices;
- * }
- */ -public class XrHandTrackingMeshFB extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - JOINTCAPACITYINPUT, - JOINTCOUNTOUTPUT, - JOINTBINDPOSES, - JOINTRADII, - JOINTPARENTS, - VERTEXCAPACITYINPUT, - VERTEXCOUNTOUTPUT, - VERTEXPOSITIONS, - VERTEXNORMALS, - VERTEXUVS, - VERTEXBLENDINDICES, - VERTEXBLENDWEIGHTS, - INDEXCAPACITYINPUT, - INDEXCOUNTOUTPUT, - INDICES; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(4), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(4), - __member(4), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(4), - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - JOINTCAPACITYINPUT = layout.offsetof(2); - JOINTCOUNTOUTPUT = layout.offsetof(3); - JOINTBINDPOSES = layout.offsetof(4); - JOINTRADII = layout.offsetof(5); - JOINTPARENTS = layout.offsetof(6); - VERTEXCAPACITYINPUT = layout.offsetof(7); - VERTEXCOUNTOUTPUT = layout.offsetof(8); - VERTEXPOSITIONS = layout.offsetof(9); - VERTEXNORMALS = layout.offsetof(10); - VERTEXUVS = layout.offsetof(11); - VERTEXBLENDINDICES = layout.offsetof(12); - VERTEXBLENDWEIGHTS = layout.offsetof(13); - INDEXCAPACITYINPUT = layout.offsetof(14); - INDEXCOUNTOUTPUT = layout.offsetof(15); - INDICES = layout.offsetof(16); - } - - /** - * Creates a {@code XrHandTrackingMeshFB} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrHandTrackingMeshFB(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return the value of the {@code jointCapacityInput} field. */ - @NativeType("uint32_t") - public int jointCapacityInput() { return njointCapacityInput(address()); } - /** @return the value of the {@code jointCountOutput} field. */ - @NativeType("uint32_t") - public int jointCountOutput() { return njointCountOutput(address()); } - /** @return a {@link XrPosef.Buffer} view of the struct array pointed to by the {@code jointBindPoses} field. */ - @NativeType("XrPosef *") - public XrPosef.Buffer jointBindPoses() { return njointBindPoses(address()); } - /** @return a {@link FloatBuffer} view of the data pointed to by the {@code jointRadii} field. */ - @NativeType("float *") - public FloatBuffer jointRadii() { return njointRadii(address()); } - /** @return a {@link IntBuffer} view of the data pointed to by the {@code jointParents} field. */ - @NativeType("XrHandJointEXT *") - public IntBuffer jointParents() { return njointParents(address()); } - /** @return the value of the {@code vertexCapacityInput} field. */ - @NativeType("uint32_t") - public int vertexCapacityInput() { return nvertexCapacityInput(address()); } - /** @return the value of the {@code vertexCountOutput} field. */ - @NativeType("uint32_t") - public int vertexCountOutput() { return nvertexCountOutput(address()); } - /** @return a {@link XrVector3f.Buffer} view of the struct array pointed to by the {@code vertexPositions} field. */ - @NativeType("XrVector3f *") - public XrVector3f.Buffer vertexPositions() { return nvertexPositions(address()); } - /** @return a {@link XrVector3f.Buffer} view of the struct array pointed to by the {@code vertexNormals} field. */ - @NativeType("XrVector3f *") - public XrVector3f.Buffer vertexNormals() { return nvertexNormals(address()); } - /** @return a {@link XrVector2f.Buffer} view of the struct array pointed to by the {@code vertexUVs} field. */ - @NativeType("XrVector2f *") - public XrVector2f.Buffer vertexUVs() { return nvertexUVs(address()); } - /** @return a {@link XrVector4sFB.Buffer} view of the struct array pointed to by the {@code vertexBlendIndices} field. */ - @NativeType("XrVector4sFB *") - public XrVector4sFB.Buffer vertexBlendIndices() { return nvertexBlendIndices(address()); } - /** @return a {@link XrVector4f.Buffer} view of the struct array pointed to by the {@code vertexBlendWeights} field. */ - @NativeType("XrVector4f *") - public XrVector4f.Buffer vertexBlendWeights() { return nvertexBlendWeights(address()); } - /** @return the value of the {@code indexCapacityInput} field. */ - @NativeType("uint32_t") - public int indexCapacityInput() { return nindexCapacityInput(address()); } - /** @return the value of the {@code indexCountOutput} field. */ - @NativeType("uint32_t") - public int indexCountOutput() { return nindexCountOutput(address()); } - /** @return a {@link ShortBuffer} view of the data pointed to by the {@code indices} field. */ - @NativeType("int16_t *") - public ShortBuffer indices() { return nindices(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrHandTrackingMeshFB type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link FBHandTrackingMesh#XR_TYPE_HAND_TRACKING_MESH_FB TYPE_HAND_TRACKING_MESH_FB} value to the {@code type} field. */ - public XrHandTrackingMeshFB type$Default() { return type(FBHandTrackingMesh.XR_TYPE_HAND_TRACKING_MESH_FB); } - /** Sets the specified value to the {@code next} field. */ - public XrHandTrackingMeshFB next(@NativeType("void *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code jointCapacityInput} field. */ - public XrHandTrackingMeshFB jointCapacityInput(@NativeType("uint32_t") int value) { njointCapacityInput(address(), value); return this; } - /** Sets the specified value to the {@code jointCountOutput} field. */ - public XrHandTrackingMeshFB jointCountOutput(@NativeType("uint32_t") int value) { njointCountOutput(address(), value); return this; } - /** Sets the address of the specified {@link XrPosef.Buffer} to the {@code jointBindPoses} field. */ - public XrHandTrackingMeshFB jointBindPoses(@NativeType("XrPosef *") XrPosef.Buffer value) { njointBindPoses(address(), value); return this; } - /** Sets the address of the specified {@link FloatBuffer} to the {@code jointRadii} field. */ - public XrHandTrackingMeshFB jointRadii(@NativeType("float *") FloatBuffer value) { njointRadii(address(), value); return this; } - /** Sets the address of the specified {@link IntBuffer} to the {@code jointParents} field. */ - public XrHandTrackingMeshFB jointParents(@NativeType("XrHandJointEXT *") IntBuffer value) { njointParents(address(), value); return this; } - /** Sets the specified value to the {@code vertexCapacityInput} field. */ - public XrHandTrackingMeshFB vertexCapacityInput(@NativeType("uint32_t") int value) { nvertexCapacityInput(address(), value); return this; } - /** Sets the specified value to the {@code vertexCountOutput} field. */ - public XrHandTrackingMeshFB vertexCountOutput(@NativeType("uint32_t") int value) { nvertexCountOutput(address(), value); return this; } - /** Sets the address of the specified {@link XrVector3f.Buffer} to the {@code vertexPositions} field. */ - public XrHandTrackingMeshFB vertexPositions(@NativeType("XrVector3f *") XrVector3f.Buffer value) { nvertexPositions(address(), value); return this; } - /** Sets the address of the specified {@link XrVector3f.Buffer} to the {@code vertexNormals} field. */ - public XrHandTrackingMeshFB vertexNormals(@NativeType("XrVector3f *") XrVector3f.Buffer value) { nvertexNormals(address(), value); return this; } - /** Sets the address of the specified {@link XrVector2f.Buffer} to the {@code vertexUVs} field. */ - public XrHandTrackingMeshFB vertexUVs(@NativeType("XrVector2f *") XrVector2f.Buffer value) { nvertexUVs(address(), value); return this; } - /** Sets the address of the specified {@link XrVector4sFB.Buffer} to the {@code vertexBlendIndices} field. */ - public XrHandTrackingMeshFB vertexBlendIndices(@NativeType("XrVector4sFB *") XrVector4sFB.Buffer value) { nvertexBlendIndices(address(), value); return this; } - /** Sets the address of the specified {@link XrVector4f.Buffer} to the {@code vertexBlendWeights} field. */ - public XrHandTrackingMeshFB vertexBlendWeights(@NativeType("XrVector4f *") XrVector4f.Buffer value) { nvertexBlendWeights(address(), value); return this; } - /** Sets the specified value to the {@code indexCountOutput} field. */ - public XrHandTrackingMeshFB indexCountOutput(@NativeType("uint32_t") int value) { nindexCountOutput(address(), value); return this; } - /** Sets the address of the specified {@link ShortBuffer} to the {@code indices} field. */ - public XrHandTrackingMeshFB indices(@NativeType("int16_t *") ShortBuffer value) { nindices(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrHandTrackingMeshFB set( - int type, - long next, - int jointCapacityInput, - int jointCountOutput, - XrPosef.Buffer jointBindPoses, - FloatBuffer jointRadii, - IntBuffer jointParents, - int vertexCapacityInput, - int vertexCountOutput, - XrVector3f.Buffer vertexPositions, - XrVector3f.Buffer vertexNormals, - XrVector2f.Buffer vertexUVs, - XrVector4sFB.Buffer vertexBlendIndices, - XrVector4f.Buffer vertexBlendWeights, - int indexCountOutput, - ShortBuffer indices - ) { - type(type); - next(next); - jointCapacityInput(jointCapacityInput); - jointCountOutput(jointCountOutput); - jointBindPoses(jointBindPoses); - jointRadii(jointRadii); - jointParents(jointParents); - vertexCapacityInput(vertexCapacityInput); - vertexCountOutput(vertexCountOutput); - vertexPositions(vertexPositions); - vertexNormals(vertexNormals); - vertexUVs(vertexUVs); - vertexBlendIndices(vertexBlendIndices); - vertexBlendWeights(vertexBlendWeights); - indexCountOutput(indexCountOutput); - indices(indices); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrHandTrackingMeshFB set(XrHandTrackingMeshFB src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrHandTrackingMeshFB} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrHandTrackingMeshFB malloc() { - return wrap(XrHandTrackingMeshFB.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrHandTrackingMeshFB} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrHandTrackingMeshFB calloc() { - return wrap(XrHandTrackingMeshFB.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrHandTrackingMeshFB} instance allocated with {@link BufferUtils}. */ - public static XrHandTrackingMeshFB create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrHandTrackingMeshFB.class, memAddress(container), container); - } - - /** Returns a new {@code XrHandTrackingMeshFB} instance for the specified memory address. */ - public static XrHandTrackingMeshFB create(long address) { - return wrap(XrHandTrackingMeshFB.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrHandTrackingMeshFB createSafe(long address) { - return address == NULL ? null : wrap(XrHandTrackingMeshFB.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrHandTrackingMeshFB.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrHandTrackingMeshFB} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrHandTrackingMeshFB malloc(MemoryStack stack) { - return wrap(XrHandTrackingMeshFB.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrHandTrackingMeshFB} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrHandTrackingMeshFB calloc(MemoryStack stack) { - return wrap(XrHandTrackingMeshFB.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrHandTrackingMeshFB.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrHandTrackingMeshFB.NEXT); } - /** Unsafe version of {@link #jointCapacityInput}. */ - public static int njointCapacityInput(long struct) { return UNSAFE.getInt(null, struct + XrHandTrackingMeshFB.JOINTCAPACITYINPUT); } - /** Unsafe version of {@link #jointCountOutput}. */ - public static int njointCountOutput(long struct) { return UNSAFE.getInt(null, struct + XrHandTrackingMeshFB.JOINTCOUNTOUTPUT); } - /** Unsafe version of {@link #jointBindPoses}. */ - public static XrPosef.Buffer njointBindPoses(long struct) { return XrPosef.create(memGetAddress(struct + XrHandTrackingMeshFB.JOINTBINDPOSES), njointCapacityInput(struct)); } - /** Unsafe version of {@link #jointRadii() jointRadii}. */ - public static FloatBuffer njointRadii(long struct) { return memFloatBuffer(memGetAddress(struct + XrHandTrackingMeshFB.JOINTRADII), njointCapacityInput(struct)); } - /** Unsafe version of {@link #jointParents() jointParents}. */ - public static IntBuffer njointParents(long struct) { return memIntBuffer(memGetAddress(struct + XrHandTrackingMeshFB.JOINTPARENTS), njointCapacityInput(struct)); } - /** Unsafe version of {@link #vertexCapacityInput}. */ - public static int nvertexCapacityInput(long struct) { return UNSAFE.getInt(null, struct + XrHandTrackingMeshFB.VERTEXCAPACITYINPUT); } - /** Unsafe version of {@link #vertexCountOutput}. */ - public static int nvertexCountOutput(long struct) { return UNSAFE.getInt(null, struct + XrHandTrackingMeshFB.VERTEXCOUNTOUTPUT); } - /** Unsafe version of {@link #vertexPositions}. */ - public static XrVector3f.Buffer nvertexPositions(long struct) { return XrVector3f.create(memGetAddress(struct + XrHandTrackingMeshFB.VERTEXPOSITIONS), nvertexCapacityInput(struct)); } - /** Unsafe version of {@link #vertexNormals}. */ - public static XrVector3f.Buffer nvertexNormals(long struct) { return XrVector3f.create(memGetAddress(struct + XrHandTrackingMeshFB.VERTEXNORMALS), nvertexCapacityInput(struct)); } - /** Unsafe version of {@link #vertexUVs}. */ - public static XrVector2f.Buffer nvertexUVs(long struct) { return XrVector2f.create(memGetAddress(struct + XrHandTrackingMeshFB.VERTEXUVS), nvertexCapacityInput(struct)); } - /** Unsafe version of {@link #vertexBlendIndices}. */ - public static XrVector4sFB.Buffer nvertexBlendIndices(long struct) { return XrVector4sFB.create(memGetAddress(struct + XrHandTrackingMeshFB.VERTEXBLENDINDICES), nvertexCapacityInput(struct)); } - /** Unsafe version of {@link #vertexBlendWeights}. */ - public static XrVector4f.Buffer nvertexBlendWeights(long struct) { return XrVector4f.create(memGetAddress(struct + XrHandTrackingMeshFB.VERTEXBLENDWEIGHTS), nvertexCapacityInput(struct)); } - /** Unsafe version of {@link #indexCapacityInput}. */ - public static int nindexCapacityInput(long struct) { return UNSAFE.getInt(null, struct + XrHandTrackingMeshFB.INDEXCAPACITYINPUT); } - /** Unsafe version of {@link #indexCountOutput}. */ - public static int nindexCountOutput(long struct) { return UNSAFE.getInt(null, struct + XrHandTrackingMeshFB.INDEXCOUNTOUTPUT); } - /** Unsafe version of {@link #indices() indices}. */ - public static ShortBuffer nindices(long struct) { return memShortBuffer(memGetAddress(struct + XrHandTrackingMeshFB.INDICES), nindexCapacityInput(struct)); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrHandTrackingMeshFB.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrHandTrackingMeshFB.NEXT, value); } - /** Sets the specified value to the {@code jointCapacityInput} field of the specified {@code struct}. */ - public static void njointCapacityInput(long struct, int value) { UNSAFE.putInt(null, struct + XrHandTrackingMeshFB.JOINTCAPACITYINPUT, value); } - /** Unsafe version of {@link #jointCountOutput(int) jointCountOutput}. */ - public static void njointCountOutput(long struct, int value) { UNSAFE.putInt(null, struct + XrHandTrackingMeshFB.JOINTCOUNTOUTPUT, value); } - /** Unsafe version of {@link #jointBindPoses(XrPosef.Buffer) jointBindPoses}. */ - public static void njointBindPoses(long struct, XrPosef.Buffer value) { memPutAddress(struct + XrHandTrackingMeshFB.JOINTBINDPOSES, value.address()); } - /** Unsafe version of {@link #jointRadii(FloatBuffer) jointRadii}. */ - public static void njointRadii(long struct, FloatBuffer value) { memPutAddress(struct + XrHandTrackingMeshFB.JOINTRADII, memAddress(value)); } - /** Unsafe version of {@link #jointParents(IntBuffer) jointParents}. */ - public static void njointParents(long struct, IntBuffer value) { memPutAddress(struct + XrHandTrackingMeshFB.JOINTPARENTS, memAddress(value)); } - /** Sets the specified value to the {@code vertexCapacityInput} field of the specified {@code struct}. */ - public static void nvertexCapacityInput(long struct, int value) { UNSAFE.putInt(null, struct + XrHandTrackingMeshFB.VERTEXCAPACITYINPUT, value); } - /** Unsafe version of {@link #vertexCountOutput(int) vertexCountOutput}. */ - public static void nvertexCountOutput(long struct, int value) { UNSAFE.putInt(null, struct + XrHandTrackingMeshFB.VERTEXCOUNTOUTPUT, value); } - /** Unsafe version of {@link #vertexPositions(XrVector3f.Buffer) vertexPositions}. */ - public static void nvertexPositions(long struct, XrVector3f.Buffer value) { memPutAddress(struct + XrHandTrackingMeshFB.VERTEXPOSITIONS, value.address()); } - /** Unsafe version of {@link #vertexNormals(XrVector3f.Buffer) vertexNormals}. */ - public static void nvertexNormals(long struct, XrVector3f.Buffer value) { memPutAddress(struct + XrHandTrackingMeshFB.VERTEXNORMALS, value.address()); } - /** Unsafe version of {@link #vertexUVs(XrVector2f.Buffer) vertexUVs}. */ - public static void nvertexUVs(long struct, XrVector2f.Buffer value) { memPutAddress(struct + XrHandTrackingMeshFB.VERTEXUVS, value.address()); } - /** Unsafe version of {@link #vertexBlendIndices(XrVector4sFB.Buffer) vertexBlendIndices}. */ - public static void nvertexBlendIndices(long struct, XrVector4sFB.Buffer value) { memPutAddress(struct + XrHandTrackingMeshFB.VERTEXBLENDINDICES, value.address()); } - /** Unsafe version of {@link #vertexBlendWeights(XrVector4f.Buffer) vertexBlendWeights}. */ - public static void nvertexBlendWeights(long struct, XrVector4f.Buffer value) { memPutAddress(struct + XrHandTrackingMeshFB.VERTEXBLENDWEIGHTS, value.address()); } - /** Sets the specified value to the {@code indexCapacityInput} field of the specified {@code struct}. */ - public static void nindexCapacityInput(long struct, int value) { UNSAFE.putInt(null, struct + XrHandTrackingMeshFB.INDEXCAPACITYINPUT, value); } - /** Unsafe version of {@link #indexCountOutput(int) indexCountOutput}. */ - public static void nindexCountOutput(long struct, int value) { UNSAFE.putInt(null, struct + XrHandTrackingMeshFB.INDEXCOUNTOUTPUT, value); } - /** Unsafe version of {@link #indices(ShortBuffer) indices}. */ - public static void nindices(long struct, ShortBuffer value) { memPutAddress(struct + XrHandTrackingMeshFB.INDICES, memAddress(value)); nindexCapacityInput(struct, value.remaining()); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XrHandTrackingMeshFB.JOINTBINDPOSES)); - check(memGetAddress(struct + XrHandTrackingMeshFB.JOINTRADII)); - check(memGetAddress(struct + XrHandTrackingMeshFB.JOINTPARENTS)); - check(memGetAddress(struct + XrHandTrackingMeshFB.VERTEXPOSITIONS)); - check(memGetAddress(struct + XrHandTrackingMeshFB.VERTEXNORMALS)); - check(memGetAddress(struct + XrHandTrackingMeshFB.VERTEXUVS)); - check(memGetAddress(struct + XrHandTrackingMeshFB.VERTEXBLENDINDICES)); - check(memGetAddress(struct + XrHandTrackingMeshFB.VERTEXBLENDWEIGHTS)); - check(memGetAddress(struct + XrHandTrackingMeshFB.INDICES)); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrHandTrackingMeshFB} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrHandTrackingMeshFB ELEMENT_FACTORY = XrHandTrackingMeshFB.create(-1L); - - /** - * Creates a new {@code XrHandTrackingMeshFB.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrHandTrackingMeshFB#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrHandTrackingMeshFB getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrHandTrackingMeshFB.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrHandTrackingMeshFB.nnext(address()); } - /** @return the value of the {@code jointCapacityInput} field. */ - @NativeType("uint32_t") - public int jointCapacityInput() { return XrHandTrackingMeshFB.njointCapacityInput(address()); } - /** @return the value of the {@code jointCountOutput} field. */ - @NativeType("uint32_t") - public int jointCountOutput() { return XrHandTrackingMeshFB.njointCountOutput(address()); } - /** @return a {@link XrPosef.Buffer} view of the struct array pointed to by the {@code jointBindPoses} field. */ - @NativeType("XrPosef *") - public XrPosef.Buffer jointBindPoses() { return XrHandTrackingMeshFB.njointBindPoses(address()); } - /** @return a {@link FloatBuffer} view of the data pointed to by the {@code jointRadii} field. */ - @NativeType("float *") - public FloatBuffer jointRadii() { return XrHandTrackingMeshFB.njointRadii(address()); } - /** @return a {@link IntBuffer} view of the data pointed to by the {@code jointParents} field. */ - @NativeType("XrHandJointEXT *") - public IntBuffer jointParents() { return XrHandTrackingMeshFB.njointParents(address()); } - /** @return the value of the {@code vertexCapacityInput} field. */ - @NativeType("uint32_t") - public int vertexCapacityInput() { return XrHandTrackingMeshFB.nvertexCapacityInput(address()); } - /** @return the value of the {@code vertexCountOutput} field. */ - @NativeType("uint32_t") - public int vertexCountOutput() { return XrHandTrackingMeshFB.nvertexCountOutput(address()); } - /** @return a {@link XrVector3f.Buffer} view of the struct array pointed to by the {@code vertexPositions} field. */ - @NativeType("XrVector3f *") - public XrVector3f.Buffer vertexPositions() { return XrHandTrackingMeshFB.nvertexPositions(address()); } - /** @return a {@link XrVector3f.Buffer} view of the struct array pointed to by the {@code vertexNormals} field. */ - @NativeType("XrVector3f *") - public XrVector3f.Buffer vertexNormals() { return XrHandTrackingMeshFB.nvertexNormals(address()); } - /** @return a {@link XrVector2f.Buffer} view of the struct array pointed to by the {@code vertexUVs} field. */ - @NativeType("XrVector2f *") - public XrVector2f.Buffer vertexUVs() { return XrHandTrackingMeshFB.nvertexUVs(address()); } - /** @return a {@link XrVector4sFB.Buffer} view of the struct array pointed to by the {@code vertexBlendIndices} field. */ - @NativeType("XrVector4sFB *") - public XrVector4sFB.Buffer vertexBlendIndices() { return XrHandTrackingMeshFB.nvertexBlendIndices(address()); } - /** @return a {@link XrVector4f.Buffer} view of the struct array pointed to by the {@code vertexBlendWeights} field. */ - @NativeType("XrVector4f *") - public XrVector4f.Buffer vertexBlendWeights() { return XrHandTrackingMeshFB.nvertexBlendWeights(address()); } - /** @return the value of the {@code indexCapacityInput} field. */ - @NativeType("uint32_t") - public int indexCapacityInput() { return XrHandTrackingMeshFB.nindexCapacityInput(address()); } - /** @return the value of the {@code indexCountOutput} field. */ - @NativeType("uint32_t") - public int indexCountOutput() { return XrHandTrackingMeshFB.nindexCountOutput(address()); } - /** @return a {@link ShortBuffer} view of the data pointed to by the {@code indices} field. */ - @NativeType("int16_t *") - public ShortBuffer indices() { return XrHandTrackingMeshFB.nindices(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrHandTrackingMeshFB.ntype(address(), value); return this; } - /** Sets the {@link FBHandTrackingMesh#XR_TYPE_HAND_TRACKING_MESH_FB TYPE_HAND_TRACKING_MESH_FB} value to the {@code type} field. */ - public Buffer type$Default() { return type(FBHandTrackingMesh.XR_TYPE_HAND_TRACKING_MESH_FB); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrHandTrackingMeshFB.nnext(address(), value); return this; } - /** Sets the specified value to the {@code jointCapacityInput} field. */ - public Buffer jointCapacityInput(@NativeType("uint32_t") int value) { XrHandTrackingMeshFB.njointCapacityInput(address(), value); return this; } - /** Sets the specified value to the {@code jointCountOutput} field. */ - public Buffer jointCountOutput(@NativeType("uint32_t") int value) { XrHandTrackingMeshFB.njointCountOutput(address(), value); return this; } - /** Sets the address of the specified {@link XrPosef.Buffer} to the {@code jointBindPoses} field. */ - public Buffer jointBindPoses(@NativeType("XrPosef *") XrPosef.Buffer value) { XrHandTrackingMeshFB.njointBindPoses(address(), value); return this; } - /** Sets the address of the specified {@link FloatBuffer} to the {@code jointRadii} field. */ - public Buffer jointRadii(@NativeType("float *") FloatBuffer value) { XrHandTrackingMeshFB.njointRadii(address(), value); return this; } - /** Sets the address of the specified {@link IntBuffer} to the {@code jointParents} field. */ - public Buffer jointParents(@NativeType("XrHandJointEXT *") IntBuffer value) { XrHandTrackingMeshFB.njointParents(address(), value); return this; } - /** Sets the specified value to the {@code vertexCapacityInput} field. */ - public Buffer vertexCapacityInput(@NativeType("uint32_t") int value) { XrHandTrackingMeshFB.nvertexCapacityInput(address(), value); return this; } - /** Sets the specified value to the {@code vertexCountOutput} field. */ - public Buffer vertexCountOutput(@NativeType("uint32_t") int value) { XrHandTrackingMeshFB.nvertexCountOutput(address(), value); return this; } - /** Sets the address of the specified {@link XrVector3f.Buffer} to the {@code vertexPositions} field. */ - public Buffer vertexPositions(@NativeType("XrVector3f *") XrVector3f.Buffer value) { XrHandTrackingMeshFB.nvertexPositions(address(), value); return this; } - /** Sets the address of the specified {@link XrVector3f.Buffer} to the {@code vertexNormals} field. */ - public Buffer vertexNormals(@NativeType("XrVector3f *") XrVector3f.Buffer value) { XrHandTrackingMeshFB.nvertexNormals(address(), value); return this; } - /** Sets the address of the specified {@link XrVector2f.Buffer} to the {@code vertexUVs} field. */ - public Buffer vertexUVs(@NativeType("XrVector2f *") XrVector2f.Buffer value) { XrHandTrackingMeshFB.nvertexUVs(address(), value); return this; } - /** Sets the address of the specified {@link XrVector4sFB.Buffer} to the {@code vertexBlendIndices} field. */ - public Buffer vertexBlendIndices(@NativeType("XrVector4sFB *") XrVector4sFB.Buffer value) { XrHandTrackingMeshFB.nvertexBlendIndices(address(), value); return this; } - /** Sets the address of the specified {@link XrVector4f.Buffer} to the {@code vertexBlendWeights} field. */ - public Buffer vertexBlendWeights(@NativeType("XrVector4f *") XrVector4f.Buffer value) { XrHandTrackingMeshFB.nvertexBlendWeights(address(), value); return this; } - /** Sets the specified value to the {@code indexCountOutput} field. */ - public Buffer indexCountOutput(@NativeType("uint32_t") int value) { XrHandTrackingMeshFB.nindexCountOutput(address(), value); return this; } - /** Sets the address of the specified {@link ShortBuffer} to the {@code indices} field. */ - public Buffer indices(@NativeType("int16_t *") ShortBuffer value) { XrHandTrackingMeshFB.nindices(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandTrackingScaleFB.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandTrackingScaleFB.java deleted file mode 100644 index 25ff12a7..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrHandTrackingScaleFB.java +++ /dev/null @@ -1,353 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrHandTrackingScaleFB {
- *     XrStructureType type;
- *     void * next;
- *     float sensorOutput;
- *     float currentOutput;
- *     XrBool32 overrideHandScale;
- *     float overrideValueInput;
- * }
- */ -public class XrHandTrackingScaleFB extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - SENSOROUTPUT, - CURRENTOUTPUT, - OVERRIDEHANDSCALE, - OVERRIDEVALUEINPUT; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(4), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - SENSOROUTPUT = layout.offsetof(2); - CURRENTOUTPUT = layout.offsetof(3); - OVERRIDEHANDSCALE = layout.offsetof(4); - OVERRIDEVALUEINPUT = layout.offsetof(5); - } - - /** - * Creates a {@code XrHandTrackingScaleFB} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrHandTrackingScaleFB(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return the value of the {@code sensorOutput} field. */ - public float sensorOutput() { return nsensorOutput(address()); } - /** @return the value of the {@code currentOutput} field. */ - public float currentOutput() { return ncurrentOutput(address()); } - /** @return the value of the {@code overrideHandScale} field. */ - @NativeType("XrBool32") - public boolean overrideHandScale() { return noverrideHandScale(address()) != 0; } - /** @return the value of the {@code overrideValueInput} field. */ - public float overrideValueInput() { return noverrideValueInput(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrHandTrackingScaleFB type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link FBHandTrackingMesh#XR_TYPE_HAND_TRACKING_SCALE_FB TYPE_HAND_TRACKING_SCALE_FB} value to the {@code type} field. */ - public XrHandTrackingScaleFB type$Default() { return type(FBHandTrackingMesh.XR_TYPE_HAND_TRACKING_SCALE_FB); } - /** Sets the specified value to the {@code next} field. */ - public XrHandTrackingScaleFB next(@NativeType("void *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code sensorOutput} field. */ - public XrHandTrackingScaleFB sensorOutput(float value) { nsensorOutput(address(), value); return this; } - /** Sets the specified value to the {@code currentOutput} field. */ - public XrHandTrackingScaleFB currentOutput(float value) { ncurrentOutput(address(), value); return this; } - /** Sets the specified value to the {@code overrideHandScale} field. */ - public XrHandTrackingScaleFB overrideHandScale(@NativeType("XrBool32") boolean value) { noverrideHandScale(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@code overrideValueInput} field. */ - public XrHandTrackingScaleFB overrideValueInput(float value) { noverrideValueInput(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrHandTrackingScaleFB set( - int type, - long next, - float sensorOutput, - float currentOutput, - boolean overrideHandScale, - float overrideValueInput - ) { - type(type); - next(next); - sensorOutput(sensorOutput); - currentOutput(currentOutput); - overrideHandScale(overrideHandScale); - overrideValueInput(overrideValueInput); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrHandTrackingScaleFB set(XrHandTrackingScaleFB src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrHandTrackingScaleFB} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrHandTrackingScaleFB malloc() { - return wrap(XrHandTrackingScaleFB.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrHandTrackingScaleFB} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrHandTrackingScaleFB calloc() { - return wrap(XrHandTrackingScaleFB.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrHandTrackingScaleFB} instance allocated with {@link BufferUtils}. */ - public static XrHandTrackingScaleFB create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrHandTrackingScaleFB.class, memAddress(container), container); - } - - /** Returns a new {@code XrHandTrackingScaleFB} instance for the specified memory address. */ - public static XrHandTrackingScaleFB create(long address) { - return wrap(XrHandTrackingScaleFB.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrHandTrackingScaleFB createSafe(long address) { - return address == NULL ? null : wrap(XrHandTrackingScaleFB.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrHandTrackingScaleFB.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrHandTrackingScaleFB} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrHandTrackingScaleFB malloc(MemoryStack stack) { - return wrap(XrHandTrackingScaleFB.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrHandTrackingScaleFB} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrHandTrackingScaleFB calloc(MemoryStack stack) { - return wrap(XrHandTrackingScaleFB.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrHandTrackingScaleFB.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrHandTrackingScaleFB.NEXT); } - /** Unsafe version of {@link #sensorOutput}. */ - public static float nsensorOutput(long struct) { return UNSAFE.getFloat(null, struct + XrHandTrackingScaleFB.SENSOROUTPUT); } - /** Unsafe version of {@link #currentOutput}. */ - public static float ncurrentOutput(long struct) { return UNSAFE.getFloat(null, struct + XrHandTrackingScaleFB.CURRENTOUTPUT); } - /** Unsafe version of {@link #overrideHandScale}. */ - public static int noverrideHandScale(long struct) { return UNSAFE.getInt(null, struct + XrHandTrackingScaleFB.OVERRIDEHANDSCALE); } - /** Unsafe version of {@link #overrideValueInput}. */ - public static float noverrideValueInput(long struct) { return UNSAFE.getFloat(null, struct + XrHandTrackingScaleFB.OVERRIDEVALUEINPUT); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrHandTrackingScaleFB.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrHandTrackingScaleFB.NEXT, value); } - /** Unsafe version of {@link #sensorOutput(float) sensorOutput}. */ - public static void nsensorOutput(long struct, float value) { UNSAFE.putFloat(null, struct + XrHandTrackingScaleFB.SENSOROUTPUT, value); } - /** Unsafe version of {@link #currentOutput(float) currentOutput}. */ - public static void ncurrentOutput(long struct, float value) { UNSAFE.putFloat(null, struct + XrHandTrackingScaleFB.CURRENTOUTPUT, value); } - /** Unsafe version of {@link #overrideHandScale(boolean) overrideHandScale}. */ - public static void noverrideHandScale(long struct, int value) { UNSAFE.putInt(null, struct + XrHandTrackingScaleFB.OVERRIDEHANDSCALE, value); } - /** Unsafe version of {@link #overrideValueInput(float) overrideValueInput}. */ - public static void noverrideValueInput(long struct, float value) { UNSAFE.putFloat(null, struct + XrHandTrackingScaleFB.OVERRIDEVALUEINPUT, value); } - - // ----------------------------------- - - /** An array of {@link XrHandTrackingScaleFB} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrHandTrackingScaleFB ELEMENT_FACTORY = XrHandTrackingScaleFB.create(-1L); - - /** - * Creates a new {@code XrHandTrackingScaleFB.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrHandTrackingScaleFB#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrHandTrackingScaleFB getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrHandTrackingScaleFB.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrHandTrackingScaleFB.nnext(address()); } - /** @return the value of the {@code sensorOutput} field. */ - public float sensorOutput() { return XrHandTrackingScaleFB.nsensorOutput(address()); } - /** @return the value of the {@code currentOutput} field. */ - public float currentOutput() { return XrHandTrackingScaleFB.ncurrentOutput(address()); } - /** @return the value of the {@code overrideHandScale} field. */ - @NativeType("XrBool32") - public boolean overrideHandScale() { return XrHandTrackingScaleFB.noverrideHandScale(address()) != 0; } - /** @return the value of the {@code overrideValueInput} field. */ - public float overrideValueInput() { return XrHandTrackingScaleFB.noverrideValueInput(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrHandTrackingScaleFB.ntype(address(), value); return this; } - /** Sets the {@link FBHandTrackingMesh#XR_TYPE_HAND_TRACKING_SCALE_FB TYPE_HAND_TRACKING_SCALE_FB} value to the {@code type} field. */ - public Buffer type$Default() { return type(FBHandTrackingMesh.XR_TYPE_HAND_TRACKING_SCALE_FB); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrHandTrackingScaleFB.nnext(address(), value); return this; } - /** Sets the specified value to the {@code sensorOutput} field. */ - public Buffer sensorOutput(float value) { XrHandTrackingScaleFB.nsensorOutput(address(), value); return this; } - /** Sets the specified value to the {@code currentOutput} field. */ - public Buffer currentOutput(float value) { XrHandTrackingScaleFB.ncurrentOutput(address(), value); return this; } - /** Sets the specified value to the {@code overrideHandScale} field. */ - public Buffer overrideHandScale(@NativeType("XrBool32") boolean value) { XrHandTrackingScaleFB.noverrideHandScale(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@code overrideValueInput} field. */ - public Buffer overrideValueInput(float value) { XrHandTrackingScaleFB.noverrideValueInput(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrHapticActionInfo.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrHapticActionInfo.java deleted file mode 100644 index 1a719cd1..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrHapticActionInfo.java +++ /dev/null @@ -1,341 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrHapticActionInfo {
- *     XrStructureType type;
- *     void const * next;
- *     XrAction action;
- *     XrPath subactionPath;
- * }
- */ -public class XrHapticActionInfo extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - ACTION, - SUBACTIONPATH; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(8) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - ACTION = layout.offsetof(2); - SUBACTIONPATH = layout.offsetof(3); - } - - /** - * Creates a {@code XrHapticActionInfo} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrHapticActionInfo(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code action} field. */ - @NativeType("XrAction") - public long action() { return naction(address()); } - /** @return the value of the {@code subactionPath} field. */ - @NativeType("XrPath") - public long subactionPath() { return nsubactionPath(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrHapticActionInfo type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_HAPTIC_ACTION_INFO TYPE_HAPTIC_ACTION_INFO} value to the {@code type} field. */ - public XrHapticActionInfo type$Default() { return type(XR10.XR_TYPE_HAPTIC_ACTION_INFO); } - /** Sets the specified value to the {@code next} field. */ - public XrHapticActionInfo next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code action} field. */ - public XrHapticActionInfo action(XrAction value) { naction(address(), value); return this; } - /** Sets the specified value to the {@code subactionPath} field. */ - public XrHapticActionInfo subactionPath(@NativeType("XrPath") long value) { nsubactionPath(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrHapticActionInfo set( - int type, - long next, - XrAction action, - long subactionPath - ) { - type(type); - next(next); - action(action); - subactionPath(subactionPath); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrHapticActionInfo set(XrHapticActionInfo src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrHapticActionInfo} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrHapticActionInfo malloc() { - return wrap(XrHapticActionInfo.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrHapticActionInfo} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrHapticActionInfo calloc() { - return wrap(XrHapticActionInfo.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrHapticActionInfo} instance allocated with {@link BufferUtils}. */ - public static XrHapticActionInfo create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrHapticActionInfo.class, memAddress(container), container); - } - - /** Returns a new {@code XrHapticActionInfo} instance for the specified memory address. */ - public static XrHapticActionInfo create(long address) { - return wrap(XrHapticActionInfo.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrHapticActionInfo createSafe(long address) { - return address == NULL ? null : wrap(XrHapticActionInfo.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrHapticActionInfo.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrHapticActionInfo} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrHapticActionInfo malloc(MemoryStack stack) { - return wrap(XrHapticActionInfo.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrHapticActionInfo} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrHapticActionInfo calloc(MemoryStack stack) { - return wrap(XrHapticActionInfo.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrHapticActionInfo.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrHapticActionInfo.NEXT); } - /** Unsafe version of {@link #action}. */ - public static long naction(long struct) { return memGetAddress(struct + XrHapticActionInfo.ACTION); } - /** Unsafe version of {@link #subactionPath}. */ - public static long nsubactionPath(long struct) { return UNSAFE.getLong(null, struct + XrHapticActionInfo.SUBACTIONPATH); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrHapticActionInfo.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrHapticActionInfo.NEXT, value); } - /** Unsafe version of {@link #action(XrAction) action}. */ - public static void naction(long struct, XrAction value) { memPutAddress(struct + XrHapticActionInfo.ACTION, value.address()); } - /** Unsafe version of {@link #subactionPath(long) subactionPath}. */ - public static void nsubactionPath(long struct, long value) { UNSAFE.putLong(null, struct + XrHapticActionInfo.SUBACTIONPATH, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XrHapticActionInfo.ACTION)); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrHapticActionInfo} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrHapticActionInfo ELEMENT_FACTORY = XrHapticActionInfo.create(-1L); - - /** - * Creates a new {@code XrHapticActionInfo.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrHapticActionInfo#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrHapticActionInfo getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrHapticActionInfo.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrHapticActionInfo.nnext(address()); } - /** @return the value of the {@code action} field. */ - @NativeType("XrAction") - public long action() { return XrHapticActionInfo.naction(address()); } - /** @return the value of the {@code subactionPath} field. */ - @NativeType("XrPath") - public long subactionPath() { return XrHapticActionInfo.nsubactionPath(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrHapticActionInfo.ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_HAPTIC_ACTION_INFO TYPE_HAPTIC_ACTION_INFO} value to the {@code type} field. */ - public Buffer type$Default() { return type(XR10.XR_TYPE_HAPTIC_ACTION_INFO); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrHapticActionInfo.nnext(address(), value); return this; } - /** Sets the specified value to the {@code action} field. */ - public Buffer action(XrAction value) { XrHapticActionInfo.naction(address(), value); return this; } - /** Sets the specified value to the {@code subactionPath} field. */ - public Buffer subactionPath(@NativeType("XrPath") long value) { XrHapticActionInfo.nsubactionPath(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrHapticBaseHeader.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrHapticBaseHeader.java deleted file mode 100644 index 37ba0b71..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrHapticBaseHeader.java +++ /dev/null @@ -1,275 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrHapticBaseHeader {
- *     XrStructureType type;
- *     void const * next;
- * }
- */ -public class XrHapticBaseHeader extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - } - - /** - * Creates a {@code XrHapticBaseHeader} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrHapticBaseHeader(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrHapticBaseHeader type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the specified value to the {@code next} field. */ - public XrHapticBaseHeader next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrHapticBaseHeader set( - int type, - long next - ) { - type(type); - next(next); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrHapticBaseHeader set(XrHapticBaseHeader src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrHapticBaseHeader} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrHapticBaseHeader malloc() { - return wrap(XrHapticBaseHeader.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrHapticBaseHeader} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrHapticBaseHeader calloc() { - return wrap(XrHapticBaseHeader.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrHapticBaseHeader} instance allocated with {@link BufferUtils}. */ - public static XrHapticBaseHeader create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrHapticBaseHeader.class, memAddress(container), container); - } - - /** Returns a new {@code XrHapticBaseHeader} instance for the specified memory address. */ - public static XrHapticBaseHeader create(long address) { - return wrap(XrHapticBaseHeader.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrHapticBaseHeader createSafe(long address) { - return address == NULL ? null : wrap(XrHapticBaseHeader.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrHapticBaseHeader.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrHapticBaseHeader} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrHapticBaseHeader malloc(MemoryStack stack) { - return wrap(XrHapticBaseHeader.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrHapticBaseHeader} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrHapticBaseHeader calloc(MemoryStack stack) { - return wrap(XrHapticBaseHeader.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrHapticBaseHeader.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrHapticBaseHeader.NEXT); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrHapticBaseHeader.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrHapticBaseHeader.NEXT, value); } - - // ----------------------------------- - - /** An array of {@link XrHapticBaseHeader} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrHapticBaseHeader ELEMENT_FACTORY = XrHapticBaseHeader.create(-1L); - - /** - * Creates a new {@code XrHapticBaseHeader.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrHapticBaseHeader#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrHapticBaseHeader getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrHapticBaseHeader.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrHapticBaseHeader.nnext(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrHapticBaseHeader.ntype(address(), value); return this; } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrHapticBaseHeader.nnext(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrHapticVibration.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrHapticVibration.java deleted file mode 100644 index a2305926..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrHapticVibration.java +++ /dev/null @@ -1,335 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrHapticVibration {
- *     XrStructureType type;
- *     void const * next;
- *     XrDuration duration;
- *     float frequency;
- *     float amplitude;
- * }
- */ -public class XrHapticVibration extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - DURATION, - FREQUENCY, - AMPLITUDE; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(8), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - DURATION = layout.offsetof(2); - FREQUENCY = layout.offsetof(3); - AMPLITUDE = layout.offsetof(4); - } - - /** - * Creates a {@code XrHapticVibration} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrHapticVibration(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code duration} field. */ - @NativeType("XrDuration") - public long duration() { return nduration(address()); } - /** @return the value of the {@code frequency} field. */ - public float frequency() { return nfrequency(address()); } - /** @return the value of the {@code amplitude} field. */ - public float amplitude() { return namplitude(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrHapticVibration type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_HAPTIC_VIBRATION TYPE_HAPTIC_VIBRATION} value to the {@code type} field. */ - public XrHapticVibration type$Default() { return type(XR10.XR_TYPE_HAPTIC_VIBRATION); } - /** Sets the specified value to the {@code next} field. */ - public XrHapticVibration next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code duration} field. */ - public XrHapticVibration duration(@NativeType("XrDuration") long value) { nduration(address(), value); return this; } - /** Sets the specified value to the {@code frequency} field. */ - public XrHapticVibration frequency(float value) { nfrequency(address(), value); return this; } - /** Sets the specified value to the {@code amplitude} field. */ - public XrHapticVibration amplitude(float value) { namplitude(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrHapticVibration set( - int type, - long next, - long duration, - float frequency, - float amplitude - ) { - type(type); - next(next); - duration(duration); - frequency(frequency); - amplitude(amplitude); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrHapticVibration set(XrHapticVibration src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrHapticVibration} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrHapticVibration malloc() { - return wrap(XrHapticVibration.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrHapticVibration} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrHapticVibration calloc() { - return wrap(XrHapticVibration.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrHapticVibration} instance allocated with {@link BufferUtils}. */ - public static XrHapticVibration create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrHapticVibration.class, memAddress(container), container); - } - - /** Returns a new {@code XrHapticVibration} instance for the specified memory address. */ - public static XrHapticVibration create(long address) { - return wrap(XrHapticVibration.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrHapticVibration createSafe(long address) { - return address == NULL ? null : wrap(XrHapticVibration.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrHapticVibration.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrHapticVibration} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrHapticVibration malloc(MemoryStack stack) { - return wrap(XrHapticVibration.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrHapticVibration} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrHapticVibration calloc(MemoryStack stack) { - return wrap(XrHapticVibration.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrHapticVibration.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrHapticVibration.NEXT); } - /** Unsafe version of {@link #duration}. */ - public static long nduration(long struct) { return UNSAFE.getLong(null, struct + XrHapticVibration.DURATION); } - /** Unsafe version of {@link #frequency}. */ - public static float nfrequency(long struct) { return UNSAFE.getFloat(null, struct + XrHapticVibration.FREQUENCY); } - /** Unsafe version of {@link #amplitude}. */ - public static float namplitude(long struct) { return UNSAFE.getFloat(null, struct + XrHapticVibration.AMPLITUDE); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrHapticVibration.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrHapticVibration.NEXT, value); } - /** Unsafe version of {@link #duration(long) duration}. */ - public static void nduration(long struct, long value) { UNSAFE.putLong(null, struct + XrHapticVibration.DURATION, value); } - /** Unsafe version of {@link #frequency(float) frequency}. */ - public static void nfrequency(long struct, float value) { UNSAFE.putFloat(null, struct + XrHapticVibration.FREQUENCY, value); } - /** Unsafe version of {@link #amplitude(float) amplitude}. */ - public static void namplitude(long struct, float value) { UNSAFE.putFloat(null, struct + XrHapticVibration.AMPLITUDE, value); } - - // ----------------------------------- - - /** An array of {@link XrHapticVibration} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrHapticVibration ELEMENT_FACTORY = XrHapticVibration.create(-1L); - - /** - * Creates a new {@code XrHapticVibration.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrHapticVibration#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrHapticVibration getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrHapticVibration.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrHapticVibration.nnext(address()); } - /** @return the value of the {@code duration} field. */ - @NativeType("XrDuration") - public long duration() { return XrHapticVibration.nduration(address()); } - /** @return the value of the {@code frequency} field. */ - public float frequency() { return XrHapticVibration.nfrequency(address()); } - /** @return the value of the {@code amplitude} field. */ - public float amplitude() { return XrHapticVibration.namplitude(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrHapticVibration.ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_HAPTIC_VIBRATION TYPE_HAPTIC_VIBRATION} value to the {@code type} field. */ - public Buffer type$Default() { return type(XR10.XR_TYPE_HAPTIC_VIBRATION); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrHapticVibration.nnext(address(), value); return this; } - /** Sets the specified value to the {@code duration} field. */ - public Buffer duration(@NativeType("XrDuration") long value) { XrHapticVibration.nduration(address(), value); return this; } - /** Sets the specified value to the {@code frequency} field. */ - public Buffer frequency(float value) { XrHapticVibration.nfrequency(address(), value); return this; } - /** Sets the specified value to the {@code amplitude} field. */ - public Buffer amplitude(float value) { XrHapticVibration.namplitude(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrHolographicWindowAttachmentMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrHolographicWindowAttachmentMSFT.java deleted file mode 100644 index 630af318..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrHolographicWindowAttachmentMSFT.java +++ /dev/null @@ -1,359 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.PointerBuffer; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrHolographicWindowAttachmentMSFT {
- *     XrStructureType type;
- *     void const * next;
- *     IUnknown * holographicSpace;
- *     IUnknown * coreWindow;
- * }
- */ -public class XrHolographicWindowAttachmentMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - HOLOGRAPHICSPACE, - COREWINDOW; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - HOLOGRAPHICSPACE = layout.offsetof(2); - COREWINDOW = layout.offsetof(3); - } - - /** - * Creates a {@code XrHolographicWindowAttachmentMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrHolographicWindowAttachmentMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** - * @return a {@link PointerBuffer} view of the data pointed to by the {@code holographicSpace} field. - * - * @param capacity the number of elements in the returned buffer - */ - @NativeType("IUnknown *") - public PointerBuffer holographicSpace(int capacity) { return nholographicSpace(address(), capacity); } - /** - * @return a {@link PointerBuffer} view of the data pointed to by the {@code coreWindow} field. - * - * @param capacity the number of elements in the returned buffer - */ - @NativeType("IUnknown *") - public PointerBuffer coreWindow(int capacity) { return ncoreWindow(address(), capacity); } - - /** Sets the specified value to the {@code type} field. */ - public XrHolographicWindowAttachmentMSFT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link MSFTHolographicWindowAttachment#XR_TYPE_HOLOGRAPHIC_WINDOW_ATTACHMENT_MSFT TYPE_HOLOGRAPHIC_WINDOW_ATTACHMENT_MSFT} value to the {@code type} field. */ - public XrHolographicWindowAttachmentMSFT type$Default() { return type(MSFTHolographicWindowAttachment.XR_TYPE_HOLOGRAPHIC_WINDOW_ATTACHMENT_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public XrHolographicWindowAttachmentMSFT next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the address of the specified {@link PointerBuffer} to the {@code holographicSpace} field. */ - public XrHolographicWindowAttachmentMSFT holographicSpace(@NativeType("IUnknown *") PointerBuffer value) { nholographicSpace(address(), value); return this; } - /** Sets the address of the specified {@link PointerBuffer} to the {@code coreWindow} field. */ - public XrHolographicWindowAttachmentMSFT coreWindow(@NativeType("IUnknown *") PointerBuffer value) { ncoreWindow(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrHolographicWindowAttachmentMSFT set( - int type, - long next, - PointerBuffer holographicSpace, - PointerBuffer coreWindow - ) { - type(type); - next(next); - holographicSpace(holographicSpace); - coreWindow(coreWindow); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrHolographicWindowAttachmentMSFT set(XrHolographicWindowAttachmentMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrHolographicWindowAttachmentMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrHolographicWindowAttachmentMSFT malloc() { - return wrap(XrHolographicWindowAttachmentMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrHolographicWindowAttachmentMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrHolographicWindowAttachmentMSFT calloc() { - return wrap(XrHolographicWindowAttachmentMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrHolographicWindowAttachmentMSFT} instance allocated with {@link BufferUtils}. */ - public static XrHolographicWindowAttachmentMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrHolographicWindowAttachmentMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrHolographicWindowAttachmentMSFT} instance for the specified memory address. */ - public static XrHolographicWindowAttachmentMSFT create(long address) { - return wrap(XrHolographicWindowAttachmentMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrHolographicWindowAttachmentMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrHolographicWindowAttachmentMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrHolographicWindowAttachmentMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrHolographicWindowAttachmentMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrHolographicWindowAttachmentMSFT malloc(MemoryStack stack) { - return wrap(XrHolographicWindowAttachmentMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrHolographicWindowAttachmentMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrHolographicWindowAttachmentMSFT calloc(MemoryStack stack) { - return wrap(XrHolographicWindowAttachmentMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrHolographicWindowAttachmentMSFT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrHolographicWindowAttachmentMSFT.NEXT); } - /** Unsafe version of {@link #holographicSpace(int) holographicSpace}. */ - public static PointerBuffer nholographicSpace(long struct, int capacity) { return memPointerBuffer(memGetAddress(struct + XrHolographicWindowAttachmentMSFT.HOLOGRAPHICSPACE), capacity); } - /** Unsafe version of {@link #coreWindow(int) coreWindow}. */ - public static PointerBuffer ncoreWindow(long struct, int capacity) { return memPointerBuffer(memGetAddress(struct + XrHolographicWindowAttachmentMSFT.COREWINDOW), capacity); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrHolographicWindowAttachmentMSFT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrHolographicWindowAttachmentMSFT.NEXT, value); } - /** Unsafe version of {@link #holographicSpace(PointerBuffer) holographicSpace}. */ - public static void nholographicSpace(long struct, PointerBuffer value) { memPutAddress(struct + XrHolographicWindowAttachmentMSFT.HOLOGRAPHICSPACE, memAddress(value)); } - /** Unsafe version of {@link #coreWindow(PointerBuffer) coreWindow}. */ - public static void ncoreWindow(long struct, PointerBuffer value) { memPutAddress(struct + XrHolographicWindowAttachmentMSFT.COREWINDOW, memAddress(value)); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XrHolographicWindowAttachmentMSFT.HOLOGRAPHICSPACE)); - check(memGetAddress(struct + XrHolographicWindowAttachmentMSFT.COREWINDOW)); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrHolographicWindowAttachmentMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrHolographicWindowAttachmentMSFT ELEMENT_FACTORY = XrHolographicWindowAttachmentMSFT.create(-1L); - - /** - * Creates a new {@code XrHolographicWindowAttachmentMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrHolographicWindowAttachmentMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrHolographicWindowAttachmentMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrHolographicWindowAttachmentMSFT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrHolographicWindowAttachmentMSFT.nnext(address()); } - /** - * @return a {@link PointerBuffer} view of the data pointed to by the {@code holographicSpace} field. - * - * @param capacity the number of elements in the returned buffer - */ - @NativeType("IUnknown *") - public PointerBuffer holographicSpace(int capacity) { return XrHolographicWindowAttachmentMSFT.nholographicSpace(address(), capacity); } - /** - * @return a {@link PointerBuffer} view of the data pointed to by the {@code coreWindow} field. - * - * @param capacity the number of elements in the returned buffer - */ - @NativeType("IUnknown *") - public PointerBuffer coreWindow(int capacity) { return XrHolographicWindowAttachmentMSFT.ncoreWindow(address(), capacity); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrHolographicWindowAttachmentMSFT.ntype(address(), value); return this; } - /** Sets the {@link MSFTHolographicWindowAttachment#XR_TYPE_HOLOGRAPHIC_WINDOW_ATTACHMENT_MSFT TYPE_HOLOGRAPHIC_WINDOW_ATTACHMENT_MSFT} value to the {@code type} field. */ - public Buffer type$Default() { return type(MSFTHolographicWindowAttachment.XR_TYPE_HOLOGRAPHIC_WINDOW_ATTACHMENT_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrHolographicWindowAttachmentMSFT.nnext(address(), value); return this; } - /** Sets the address of the specified {@link PointerBuffer} to the {@code holographicSpace} field. */ - public Buffer holographicSpace(@NativeType("IUnknown *") PointerBuffer value) { XrHolographicWindowAttachmentMSFT.nholographicSpace(address(), value); return this; } - /** Sets the address of the specified {@link PointerBuffer} to the {@code coreWindow} field. */ - public Buffer coreWindow(@NativeType("IUnknown *") PointerBuffer value) { XrHolographicWindowAttachmentMSFT.ncoreWindow(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrInputSourceLocalizedNameGetInfo.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrInputSourceLocalizedNameGetInfo.java deleted file mode 100644 index 6133e67d..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrInputSourceLocalizedNameGetInfo.java +++ /dev/null @@ -1,319 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrInputSourceLocalizedNameGetInfo {
- *     XrStructureType type;
- *     void const * next;
- *     XrPath sourcePath;
- *     XrInputSourceLocalizedNameFlags whichComponents;
- * }
- */ -public class XrInputSourceLocalizedNameGetInfo extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - SOURCEPATH, - WHICHCOMPONENTS; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(8), - __member(8) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - SOURCEPATH = layout.offsetof(2); - WHICHCOMPONENTS = layout.offsetof(3); - } - - /** - * Creates a {@code XrInputSourceLocalizedNameGetInfo} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrInputSourceLocalizedNameGetInfo(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code sourcePath} field. */ - @NativeType("XrPath") - public long sourcePath() { return nsourcePath(address()); } - /** @return the value of the {@code whichComponents} field. */ - @NativeType("XrInputSourceLocalizedNameFlags") - public long whichComponents() { return nwhichComponents(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrInputSourceLocalizedNameGetInfo type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_INPUT_SOURCE_LOCALIZED_NAME_GET_INFO TYPE_INPUT_SOURCE_LOCALIZED_NAME_GET_INFO} value to the {@code type} field. */ - public XrInputSourceLocalizedNameGetInfo type$Default() { return type(XR10.XR_TYPE_INPUT_SOURCE_LOCALIZED_NAME_GET_INFO); } - /** Sets the specified value to the {@code next} field. */ - public XrInputSourceLocalizedNameGetInfo next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code sourcePath} field. */ - public XrInputSourceLocalizedNameGetInfo sourcePath(@NativeType("XrPath") long value) { nsourcePath(address(), value); return this; } - /** Sets the specified value to the {@code whichComponents} field. */ - public XrInputSourceLocalizedNameGetInfo whichComponents(@NativeType("XrInputSourceLocalizedNameFlags") long value) { nwhichComponents(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrInputSourceLocalizedNameGetInfo set( - int type, - long next, - long sourcePath, - long whichComponents - ) { - type(type); - next(next); - sourcePath(sourcePath); - whichComponents(whichComponents); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrInputSourceLocalizedNameGetInfo set(XrInputSourceLocalizedNameGetInfo src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrInputSourceLocalizedNameGetInfo} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrInputSourceLocalizedNameGetInfo malloc() { - return wrap(XrInputSourceLocalizedNameGetInfo.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrInputSourceLocalizedNameGetInfo} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrInputSourceLocalizedNameGetInfo calloc() { - return wrap(XrInputSourceLocalizedNameGetInfo.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrInputSourceLocalizedNameGetInfo} instance allocated with {@link BufferUtils}. */ - public static XrInputSourceLocalizedNameGetInfo create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrInputSourceLocalizedNameGetInfo.class, memAddress(container), container); - } - - /** Returns a new {@code XrInputSourceLocalizedNameGetInfo} instance for the specified memory address. */ - public static XrInputSourceLocalizedNameGetInfo create(long address) { - return wrap(XrInputSourceLocalizedNameGetInfo.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrInputSourceLocalizedNameGetInfo createSafe(long address) { - return address == NULL ? null : wrap(XrInputSourceLocalizedNameGetInfo.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrInputSourceLocalizedNameGetInfo.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrInputSourceLocalizedNameGetInfo} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrInputSourceLocalizedNameGetInfo malloc(MemoryStack stack) { - return wrap(XrInputSourceLocalizedNameGetInfo.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrInputSourceLocalizedNameGetInfo} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrInputSourceLocalizedNameGetInfo calloc(MemoryStack stack) { - return wrap(XrInputSourceLocalizedNameGetInfo.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrInputSourceLocalizedNameGetInfo.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrInputSourceLocalizedNameGetInfo.NEXT); } - /** Unsafe version of {@link #sourcePath}. */ - public static long nsourcePath(long struct) { return UNSAFE.getLong(null, struct + XrInputSourceLocalizedNameGetInfo.SOURCEPATH); } - /** Unsafe version of {@link #whichComponents}. */ - public static long nwhichComponents(long struct) { return UNSAFE.getLong(null, struct + XrInputSourceLocalizedNameGetInfo.WHICHCOMPONENTS); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrInputSourceLocalizedNameGetInfo.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrInputSourceLocalizedNameGetInfo.NEXT, value); } - /** Unsafe version of {@link #sourcePath(long) sourcePath}. */ - public static void nsourcePath(long struct, long value) { UNSAFE.putLong(null, struct + XrInputSourceLocalizedNameGetInfo.SOURCEPATH, value); } - /** Unsafe version of {@link #whichComponents(long) whichComponents}. */ - public static void nwhichComponents(long struct, long value) { UNSAFE.putLong(null, struct + XrInputSourceLocalizedNameGetInfo.WHICHCOMPONENTS, value); } - - // ----------------------------------- - - /** An array of {@link XrInputSourceLocalizedNameGetInfo} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrInputSourceLocalizedNameGetInfo ELEMENT_FACTORY = XrInputSourceLocalizedNameGetInfo.create(-1L); - - /** - * Creates a new {@code XrInputSourceLocalizedNameGetInfo.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrInputSourceLocalizedNameGetInfo#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrInputSourceLocalizedNameGetInfo getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrInputSourceLocalizedNameGetInfo.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrInputSourceLocalizedNameGetInfo.nnext(address()); } - /** @return the value of the {@code sourcePath} field. */ - @NativeType("XrPath") - public long sourcePath() { return XrInputSourceLocalizedNameGetInfo.nsourcePath(address()); } - /** @return the value of the {@code whichComponents} field. */ - @NativeType("XrInputSourceLocalizedNameFlags") - public long whichComponents() { return XrInputSourceLocalizedNameGetInfo.nwhichComponents(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrInputSourceLocalizedNameGetInfo.ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_INPUT_SOURCE_LOCALIZED_NAME_GET_INFO TYPE_INPUT_SOURCE_LOCALIZED_NAME_GET_INFO} value to the {@code type} field. */ - public Buffer type$Default() { return type(XR10.XR_TYPE_INPUT_SOURCE_LOCALIZED_NAME_GET_INFO); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrInputSourceLocalizedNameGetInfo.nnext(address(), value); return this; } - /** Sets the specified value to the {@code sourcePath} field. */ - public Buffer sourcePath(@NativeType("XrPath") long value) { XrInputSourceLocalizedNameGetInfo.nsourcePath(address(), value); return this; } - /** Sets the specified value to the {@code whichComponents} field. */ - public Buffer whichComponents(@NativeType("XrInputSourceLocalizedNameFlags") long value) { XrInputSourceLocalizedNameGetInfo.nwhichComponents(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrInstance.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrInstance.java deleted file mode 100644 index 397ca82a..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrInstance.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.openxr; - -import org.lwjgl.PointerBuffer; -import org.lwjgl.system.Checks; -import org.lwjgl.system.MemoryStack; - -import java.util.HashSet; - -import static org.lwjgl.system.APIUtil.apiLog; -import static org.lwjgl.system.JNI.callPPPI; -import static org.lwjgl.system.MemoryStack.stackPush; -import static org.lwjgl.system.MemoryUtil.*; - -public class XrInstance extends DispatchableHandle { - public XrInstance(long handle, XrInstanceCreateInfo createInfo) { - super(handle, getInstanceCapabilities(handle, createInfo)); - } - - private static XRCapabilities getInstanceCapabilities(long handle, XrInstanceCreateInfo ci) { - XrApplicationInfo appInfo = ci.applicationInfo(); - - long apiVersion = appInfo.apiVersion(); - - return new XRCapabilities(functionName -> { - try (MemoryStack stack = stackPush()) { - PointerBuffer pp = stack.mallocPointer(1); - callPPPI(handle, memAddress(functionName), memAddress(pp), XR.getGlobalCommands().xrGetInstanceProcAddr); - long address = pp.get(); - if (address == NULL && Checks.DEBUG_FUNCTIONS) { - apiLog("Failed to locate address for XR instance function " + memASCII(functionName)); - } - return address; - } - }, apiVersion, XR.getEnabledExtensionSet(apiVersion, ci.enabledExtensionNames()), new HashSet<>()); - } -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrInstanceCreateInfo.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrInstanceCreateInfo.java deleted file mode 100644 index 43a445e8..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrInstanceCreateInfo.java +++ /dev/null @@ -1,421 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.PointerBuffer; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrInstanceCreateInfo {
- *     XrStructureType type;
- *     void const * next;
- *     XrInstanceCreateFlags createFlags;
- *     {@link XrApplicationInfo XrApplicationInfo} applicationInfo;
- *     uint32_t enabledApiLayerCount;
- *     char const * const * enabledApiLayerNames;
- *     uint32_t enabledExtensionCount;
- *     char const * const * enabledExtensionNames;
- * }
- */ -public class XrInstanceCreateInfo extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - CREATEFLAGS, - APPLICATIONINFO, - ENABLEDAPILAYERCOUNT, - ENABLEDAPILAYERNAMES, - ENABLEDEXTENSIONCOUNT, - ENABLEDEXTENSIONNAMES; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(8), - __member(XrApplicationInfo.SIZEOF, XrApplicationInfo.ALIGNOF), - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - CREATEFLAGS = layout.offsetof(2); - APPLICATIONINFO = layout.offsetof(3); - ENABLEDAPILAYERCOUNT = layout.offsetof(4); - ENABLEDAPILAYERNAMES = layout.offsetof(5); - ENABLEDEXTENSIONCOUNT = layout.offsetof(6); - ENABLEDEXTENSIONNAMES = layout.offsetof(7); - } - - /** - * Creates a {@code XrInstanceCreateInfo} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrInstanceCreateInfo(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code createFlags} field. */ - @NativeType("XrInstanceCreateFlags") - public long createFlags() { return ncreateFlags(address()); } - /** @return a {@link XrApplicationInfo} view of the {@code applicationInfo} field. */ - public XrApplicationInfo applicationInfo() { return napplicationInfo(address()); } - /** @return the value of the {@code enabledApiLayerCount} field. */ - @NativeType("uint32_t") - public int enabledApiLayerCount() { return nenabledApiLayerCount(address()); } - /** @return a {@link PointerBuffer} view of the data pointed to by the {@code enabledApiLayerNames} field. */ - @Nullable - @NativeType("char const * const *") - public PointerBuffer enabledApiLayerNames() { return nenabledApiLayerNames(address()); } - /** @return the value of the {@code enabledExtensionCount} field. */ - @NativeType("uint32_t") - public int enabledExtensionCount() { return nenabledExtensionCount(address()); } - /** @return a {@link PointerBuffer} view of the data pointed to by the {@code enabledExtensionNames} field. */ - @Nullable - @NativeType("char const * const *") - public PointerBuffer enabledExtensionNames() { return nenabledExtensionNames(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrInstanceCreateInfo type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_INSTANCE_CREATE_INFO TYPE_INSTANCE_CREATE_INFO} value to the {@code type} field. */ - public XrInstanceCreateInfo type$Default() { return type(XR10.XR_TYPE_INSTANCE_CREATE_INFO); } - /** Sets the specified value to the {@code next} field. */ - public XrInstanceCreateInfo next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code createFlags} field. */ - public XrInstanceCreateInfo createFlags(@NativeType("XrInstanceCreateFlags") long value) { ncreateFlags(address(), value); return this; } - /** Copies the specified {@link XrApplicationInfo} to the {@code applicationInfo} field. */ - public XrInstanceCreateInfo applicationInfo(XrApplicationInfo value) { napplicationInfo(address(), value); return this; } - /** Passes the {@code applicationInfo} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrInstanceCreateInfo applicationInfo(java.util.function.Consumer consumer) { consumer.accept(applicationInfo()); return this; } - /** Sets the address of the specified {@link PointerBuffer} to the {@code enabledApiLayerNames} field. */ - public XrInstanceCreateInfo enabledApiLayerNames(@Nullable @NativeType("char const * const *") PointerBuffer value) { nenabledApiLayerNames(address(), value); return this; } - /** Sets the address of the specified {@link PointerBuffer} to the {@code enabledExtensionNames} field. */ - public XrInstanceCreateInfo enabledExtensionNames(@Nullable @NativeType("char const * const *") PointerBuffer value) { nenabledExtensionNames(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrInstanceCreateInfo set( - int type, - long next, - long createFlags, - XrApplicationInfo applicationInfo, - @Nullable PointerBuffer enabledApiLayerNames, - @Nullable PointerBuffer enabledExtensionNames - ) { - type(type); - next(next); - createFlags(createFlags); - applicationInfo(applicationInfo); - enabledApiLayerNames(enabledApiLayerNames); - enabledExtensionNames(enabledExtensionNames); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrInstanceCreateInfo set(XrInstanceCreateInfo src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrInstanceCreateInfo} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrInstanceCreateInfo malloc() { - return wrap(XrInstanceCreateInfo.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrInstanceCreateInfo} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrInstanceCreateInfo calloc() { - return wrap(XrInstanceCreateInfo.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrInstanceCreateInfo} instance allocated with {@link BufferUtils}. */ - public static XrInstanceCreateInfo create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrInstanceCreateInfo.class, memAddress(container), container); - } - - /** Returns a new {@code XrInstanceCreateInfo} instance for the specified memory address. */ - public static XrInstanceCreateInfo create(long address) { - return wrap(XrInstanceCreateInfo.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrInstanceCreateInfo createSafe(long address) { - return address == NULL ? null : wrap(XrInstanceCreateInfo.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrInstanceCreateInfo.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrInstanceCreateInfo} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrInstanceCreateInfo malloc(MemoryStack stack) { - return wrap(XrInstanceCreateInfo.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrInstanceCreateInfo} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrInstanceCreateInfo calloc(MemoryStack stack) { - return wrap(XrInstanceCreateInfo.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrInstanceCreateInfo.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrInstanceCreateInfo.NEXT); } - /** Unsafe version of {@link #createFlags}. */ - public static long ncreateFlags(long struct) { return UNSAFE.getLong(null, struct + XrInstanceCreateInfo.CREATEFLAGS); } - /** Unsafe version of {@link #applicationInfo}. */ - public static XrApplicationInfo napplicationInfo(long struct) { return XrApplicationInfo.create(struct + XrInstanceCreateInfo.APPLICATIONINFO); } - /** Unsafe version of {@link #enabledApiLayerCount}. */ - public static int nenabledApiLayerCount(long struct) { return UNSAFE.getInt(null, struct + XrInstanceCreateInfo.ENABLEDAPILAYERCOUNT); } - /** Unsafe version of {@link #enabledApiLayerNames() enabledApiLayerNames}. */ - @Nullable public static PointerBuffer nenabledApiLayerNames(long struct) { return memPointerBufferSafe(memGetAddress(struct + XrInstanceCreateInfo.ENABLEDAPILAYERNAMES), nenabledApiLayerCount(struct)); } - /** Unsafe version of {@link #enabledExtensionCount}. */ - public static int nenabledExtensionCount(long struct) { return UNSAFE.getInt(null, struct + XrInstanceCreateInfo.ENABLEDEXTENSIONCOUNT); } - /** Unsafe version of {@link #enabledExtensionNames() enabledExtensionNames}. */ - @Nullable public static PointerBuffer nenabledExtensionNames(long struct) { return memPointerBufferSafe(memGetAddress(struct + XrInstanceCreateInfo.ENABLEDEXTENSIONNAMES), nenabledExtensionCount(struct)); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrInstanceCreateInfo.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrInstanceCreateInfo.NEXT, value); } - /** Unsafe version of {@link #createFlags(long) createFlags}. */ - public static void ncreateFlags(long struct, long value) { UNSAFE.putLong(null, struct + XrInstanceCreateInfo.CREATEFLAGS, value); } - /** Unsafe version of {@link #applicationInfo(XrApplicationInfo) applicationInfo}. */ - public static void napplicationInfo(long struct, XrApplicationInfo value) { memCopy(value.address(), struct + XrInstanceCreateInfo.APPLICATIONINFO, XrApplicationInfo.SIZEOF); } - /** Sets the specified value to the {@code enabledApiLayerCount} field of the specified {@code struct}. */ - public static void nenabledApiLayerCount(long struct, int value) { UNSAFE.putInt(null, struct + XrInstanceCreateInfo.ENABLEDAPILAYERCOUNT, value); } - /** Unsafe version of {@link #enabledApiLayerNames(PointerBuffer) enabledApiLayerNames}. */ - public static void nenabledApiLayerNames(long struct, @Nullable PointerBuffer value) { memPutAddress(struct + XrInstanceCreateInfo.ENABLEDAPILAYERNAMES, memAddressSafe(value)); nenabledApiLayerCount(struct, value == null ? 0 : value.remaining()); } - /** Sets the specified value to the {@code enabledExtensionCount} field of the specified {@code struct}. */ - public static void nenabledExtensionCount(long struct, int value) { UNSAFE.putInt(null, struct + XrInstanceCreateInfo.ENABLEDEXTENSIONCOUNT, value); } - /** Unsafe version of {@link #enabledExtensionNames(PointerBuffer) enabledExtensionNames}. */ - public static void nenabledExtensionNames(long struct, @Nullable PointerBuffer value) { memPutAddress(struct + XrInstanceCreateInfo.ENABLEDEXTENSIONNAMES, memAddressSafe(value)); nenabledExtensionCount(struct, value == null ? 0 : value.remaining()); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - if (nenabledApiLayerCount(struct) != 0) { - check(memGetAddress(struct + XrInstanceCreateInfo.ENABLEDAPILAYERNAMES)); - } - if (nenabledExtensionCount(struct) != 0) { - check(memGetAddress(struct + XrInstanceCreateInfo.ENABLEDEXTENSIONNAMES)); - } - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrInstanceCreateInfo} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrInstanceCreateInfo ELEMENT_FACTORY = XrInstanceCreateInfo.create(-1L); - - /** - * Creates a new {@code XrInstanceCreateInfo.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrInstanceCreateInfo#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrInstanceCreateInfo getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrInstanceCreateInfo.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrInstanceCreateInfo.nnext(address()); } - /** @return the value of the {@code createFlags} field. */ - @NativeType("XrInstanceCreateFlags") - public long createFlags() { return XrInstanceCreateInfo.ncreateFlags(address()); } - /** @return a {@link XrApplicationInfo} view of the {@code applicationInfo} field. */ - public XrApplicationInfo applicationInfo() { return XrInstanceCreateInfo.napplicationInfo(address()); } - /** @return the value of the {@code enabledApiLayerCount} field. */ - @NativeType("uint32_t") - public int enabledApiLayerCount() { return XrInstanceCreateInfo.nenabledApiLayerCount(address()); } - /** @return a {@link PointerBuffer} view of the data pointed to by the {@code enabledApiLayerNames} field. */ - @Nullable - @NativeType("char const * const *") - public PointerBuffer enabledApiLayerNames() { return XrInstanceCreateInfo.nenabledApiLayerNames(address()); } - /** @return the value of the {@code enabledExtensionCount} field. */ - @NativeType("uint32_t") - public int enabledExtensionCount() { return XrInstanceCreateInfo.nenabledExtensionCount(address()); } - /** @return a {@link PointerBuffer} view of the data pointed to by the {@code enabledExtensionNames} field. */ - @Nullable - @NativeType("char const * const *") - public PointerBuffer enabledExtensionNames() { return XrInstanceCreateInfo.nenabledExtensionNames(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrInstanceCreateInfo.ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_INSTANCE_CREATE_INFO TYPE_INSTANCE_CREATE_INFO} value to the {@code type} field. */ - public Buffer type$Default() { return type(XR10.XR_TYPE_INSTANCE_CREATE_INFO); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrInstanceCreateInfo.nnext(address(), value); return this; } - /** Sets the specified value to the {@code createFlags} field. */ - public Buffer createFlags(@NativeType("XrInstanceCreateFlags") long value) { XrInstanceCreateInfo.ncreateFlags(address(), value); return this; } - /** Copies the specified {@link XrApplicationInfo} to the {@code applicationInfo} field. */ - public Buffer applicationInfo(XrApplicationInfo value) { XrInstanceCreateInfo.napplicationInfo(address(), value); return this; } - /** Passes the {@code applicationInfo} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer applicationInfo(java.util.function.Consumer consumer) { consumer.accept(applicationInfo()); return this; } - /** Sets the address of the specified {@link PointerBuffer} to the {@code enabledApiLayerNames} field. */ - public Buffer enabledApiLayerNames(@Nullable @NativeType("char const * const *") PointerBuffer value) { XrInstanceCreateInfo.nenabledApiLayerNames(address(), value); return this; } - /** Sets the address of the specified {@link PointerBuffer} to the {@code enabledExtensionNames} field. */ - public Buffer enabledExtensionNames(@Nullable @NativeType("char const * const *") PointerBuffer value) { XrInstanceCreateInfo.nenabledExtensionNames(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrInstanceProperties.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrInstanceProperties.java deleted file mode 100644 index 46dd70db..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrInstanceProperties.java +++ /dev/null @@ -1,312 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.openxr.XR10.XR_MAX_RUNTIME_NAME_SIZE; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrInstanceProperties {
- *     XrStructureType type;
- *     void * next;
- *     XrVersion runtimeVersion;
- *     char runtimeName[XR_MAX_RUNTIME_NAME_SIZE];
- * }
- */ -public class XrInstanceProperties extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - RUNTIMEVERSION, - RUNTIMENAME; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(8), - __array(1, XR_MAX_RUNTIME_NAME_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - RUNTIMEVERSION = layout.offsetof(2); - RUNTIMENAME = layout.offsetof(3); - } - - /** - * Creates a {@code XrInstanceProperties} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrInstanceProperties(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return the value of the {@code runtimeVersion} field. */ - @NativeType("XrVersion") - public long runtimeVersion() { return nruntimeVersion(address()); } - /** @return a {@link ByteBuffer} view of the {@code runtimeName} field. */ - @NativeType("char[XR_MAX_RUNTIME_NAME_SIZE]") - public ByteBuffer runtimeName() { return nruntimeName(address()); } - /** @return the null-terminated string stored in the {@code runtimeName} field. */ - @NativeType("char[XR_MAX_RUNTIME_NAME_SIZE]") - public String runtimeNameString() { return nruntimeNameString(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrInstanceProperties type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_INSTANCE_PROPERTIES TYPE_INSTANCE_PROPERTIES} value to the {@code type} field. */ - public XrInstanceProperties type$Default() { return type(XR10.XR_TYPE_INSTANCE_PROPERTIES); } - /** Sets the specified value to the {@code next} field. */ - public XrInstanceProperties next(@NativeType("void *") long value) { nnext(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrInstanceProperties set( - int type, - long next - ) { - type(type); - next(next); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrInstanceProperties set(XrInstanceProperties src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrInstanceProperties} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrInstanceProperties malloc() { - return wrap(XrInstanceProperties.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrInstanceProperties} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrInstanceProperties calloc() { - return wrap(XrInstanceProperties.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrInstanceProperties} instance allocated with {@link BufferUtils}. */ - public static XrInstanceProperties create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrInstanceProperties.class, memAddress(container), container); - } - - /** Returns a new {@code XrInstanceProperties} instance for the specified memory address. */ - public static XrInstanceProperties create(long address) { - return wrap(XrInstanceProperties.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrInstanceProperties createSafe(long address) { - return address == NULL ? null : wrap(XrInstanceProperties.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrInstanceProperties.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrInstanceProperties} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrInstanceProperties malloc(MemoryStack stack) { - return wrap(XrInstanceProperties.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrInstanceProperties} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrInstanceProperties calloc(MemoryStack stack) { - return wrap(XrInstanceProperties.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrInstanceProperties.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrInstanceProperties.NEXT); } - /** Unsafe version of {@link #runtimeVersion}. */ - public static long nruntimeVersion(long struct) { return UNSAFE.getLong(null, struct + XrInstanceProperties.RUNTIMEVERSION); } - /** Unsafe version of {@link #runtimeName}. */ - public static ByteBuffer nruntimeName(long struct) { return memByteBuffer(struct + XrInstanceProperties.RUNTIMENAME, XR_MAX_RUNTIME_NAME_SIZE); } - /** Unsafe version of {@link #runtimeNameString}. */ - public static String nruntimeNameString(long struct) { return memUTF8(struct + XrInstanceProperties.RUNTIMENAME); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrInstanceProperties.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrInstanceProperties.NEXT, value); } - - // ----------------------------------- - - /** An array of {@link XrInstanceProperties} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrInstanceProperties ELEMENT_FACTORY = XrInstanceProperties.create(-1L); - - /** - * Creates a new {@code XrInstanceProperties.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrInstanceProperties#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrInstanceProperties getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrInstanceProperties.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrInstanceProperties.nnext(address()); } - /** @return the value of the {@code runtimeVersion} field. */ - @NativeType("XrVersion") - public long runtimeVersion() { return XrInstanceProperties.nruntimeVersion(address()); } - /** @return a {@link ByteBuffer} view of the {@code runtimeName} field. */ - @NativeType("char[XR_MAX_RUNTIME_NAME_SIZE]") - public ByteBuffer runtimeName() { return XrInstanceProperties.nruntimeName(address()); } - /** @return the null-terminated string stored in the {@code runtimeName} field. */ - @NativeType("char[XR_MAX_RUNTIME_NAME_SIZE]") - public String runtimeNameString() { return XrInstanceProperties.nruntimeNameString(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrInstanceProperties.ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_INSTANCE_PROPERTIES TYPE_INSTANCE_PROPERTIES} value to the {@code type} field. */ - public Buffer type$Default() { return type(XR10.XR_TYPE_INSTANCE_PROPERTIES); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrInstanceProperties.nnext(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrInteractionProfileAnalogThresholdVALVE.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrInteractionProfileAnalogThresholdVALVE.java deleted file mode 100644 index c259efa8..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrInteractionProfileAnalogThresholdVALVE.java +++ /dev/null @@ -1,421 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrInteractionProfileAnalogThresholdVALVE {
- *     XrStructureType type;
- *     void const * next;
- *     XrAction action;
- *     XrPath binding;
- *     float onThreshold;
- *     float offThreshold;
- *     {@link XrHapticBaseHeader XrHapticBaseHeader} const * onHaptic;
- *     {@link XrHapticBaseHeader XrHapticBaseHeader} const * offHaptic;
- * }
- */ -public class XrInteractionProfileAnalogThresholdVALVE extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - ACTION, - BINDING, - ONTHRESHOLD, - OFFTHRESHOLD, - ONHAPTIC, - OFFHAPTIC; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(8), - __member(4), - __member(4), - __member(POINTER_SIZE), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - ACTION = layout.offsetof(2); - BINDING = layout.offsetof(3); - ONTHRESHOLD = layout.offsetof(4); - OFFTHRESHOLD = layout.offsetof(5); - ONHAPTIC = layout.offsetof(6); - OFFHAPTIC = layout.offsetof(7); - } - - /** - * Creates a {@code XrInteractionProfileAnalogThresholdVALVE} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrInteractionProfileAnalogThresholdVALVE(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code action} field. */ - @NativeType("XrAction") - public long action() { return naction(address()); } - /** @return the value of the {@code binding} field. */ - @NativeType("XrPath") - public long binding() { return nbinding(address()); } - /** @return the value of the {@code onThreshold} field. */ - public float onThreshold() { return nonThreshold(address()); } - /** @return the value of the {@code offThreshold} field. */ - public float offThreshold() { return noffThreshold(address()); } - /** @return a {@link XrHapticBaseHeader} view of the struct pointed to by the {@code onHaptic} field. */ - @Nullable - @NativeType("XrHapticBaseHeader const *") - public XrHapticBaseHeader onHaptic() { return nonHaptic(address()); } - /** @return a {@link XrHapticBaseHeader} view of the struct pointed to by the {@code offHaptic} field. */ - @Nullable - @NativeType("XrHapticBaseHeader const *") - public XrHapticBaseHeader offHaptic() { return noffHaptic(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrInteractionProfileAnalogThresholdVALVE type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link VALVEAnalogThreshold#XR_TYPE_INTERACTION_PROFILE_ANALOG_THRESHOLD_VALVE TYPE_INTERACTION_PROFILE_ANALOG_THRESHOLD_VALVE} value to the {@code type} field. */ - public XrInteractionProfileAnalogThresholdVALVE type$Default() { return type(VALVEAnalogThreshold.XR_TYPE_INTERACTION_PROFILE_ANALOG_THRESHOLD_VALVE); } - /** Sets the specified value to the {@code next} field. */ - public XrInteractionProfileAnalogThresholdVALVE next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code action} field. */ - public XrInteractionProfileAnalogThresholdVALVE action(XrAction value) { naction(address(), value); return this; } - /** Sets the specified value to the {@code binding} field. */ - public XrInteractionProfileAnalogThresholdVALVE binding(@NativeType("XrPath") long value) { nbinding(address(), value); return this; } - /** Sets the specified value to the {@code onThreshold} field. */ - public XrInteractionProfileAnalogThresholdVALVE onThreshold(float value) { nonThreshold(address(), value); return this; } - /** Sets the specified value to the {@code offThreshold} field. */ - public XrInteractionProfileAnalogThresholdVALVE offThreshold(float value) { noffThreshold(address(), value); return this; } - /** Sets the address of the specified {@link XrHapticBaseHeader} to the {@code onHaptic} field. */ - public XrInteractionProfileAnalogThresholdVALVE onHaptic(@Nullable @NativeType("XrHapticBaseHeader const *") XrHapticBaseHeader value) { nonHaptic(address(), value); return this; } - /** Sets the address of the specified {@link XrHapticBaseHeader} to the {@code offHaptic} field. */ - public XrInteractionProfileAnalogThresholdVALVE offHaptic(@Nullable @NativeType("XrHapticBaseHeader const *") XrHapticBaseHeader value) { noffHaptic(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrInteractionProfileAnalogThresholdVALVE set( - int type, - long next, - XrAction action, - long binding, - float onThreshold, - float offThreshold, - @Nullable XrHapticBaseHeader onHaptic, - @Nullable XrHapticBaseHeader offHaptic - ) { - type(type); - next(next); - action(action); - binding(binding); - onThreshold(onThreshold); - offThreshold(offThreshold); - onHaptic(onHaptic); - offHaptic(offHaptic); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrInteractionProfileAnalogThresholdVALVE set(XrInteractionProfileAnalogThresholdVALVE src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrInteractionProfileAnalogThresholdVALVE} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrInteractionProfileAnalogThresholdVALVE malloc() { - return wrap(XrInteractionProfileAnalogThresholdVALVE.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrInteractionProfileAnalogThresholdVALVE} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrInteractionProfileAnalogThresholdVALVE calloc() { - return wrap(XrInteractionProfileAnalogThresholdVALVE.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrInteractionProfileAnalogThresholdVALVE} instance allocated with {@link BufferUtils}. */ - public static XrInteractionProfileAnalogThresholdVALVE create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrInteractionProfileAnalogThresholdVALVE.class, memAddress(container), container); - } - - /** Returns a new {@code XrInteractionProfileAnalogThresholdVALVE} instance for the specified memory address. */ - public static XrInteractionProfileAnalogThresholdVALVE create(long address) { - return wrap(XrInteractionProfileAnalogThresholdVALVE.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrInteractionProfileAnalogThresholdVALVE createSafe(long address) { - return address == NULL ? null : wrap(XrInteractionProfileAnalogThresholdVALVE.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrInteractionProfileAnalogThresholdVALVE.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrInteractionProfileAnalogThresholdVALVE} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrInteractionProfileAnalogThresholdVALVE malloc(MemoryStack stack) { - return wrap(XrInteractionProfileAnalogThresholdVALVE.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrInteractionProfileAnalogThresholdVALVE} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrInteractionProfileAnalogThresholdVALVE calloc(MemoryStack stack) { - return wrap(XrInteractionProfileAnalogThresholdVALVE.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrInteractionProfileAnalogThresholdVALVE.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrInteractionProfileAnalogThresholdVALVE.NEXT); } - /** Unsafe version of {@link #action}. */ - public static long naction(long struct) { return memGetAddress(struct + XrInteractionProfileAnalogThresholdVALVE.ACTION); } - /** Unsafe version of {@link #binding}. */ - public static long nbinding(long struct) { return UNSAFE.getLong(null, struct + XrInteractionProfileAnalogThresholdVALVE.BINDING); } - /** Unsafe version of {@link #onThreshold}. */ - public static float nonThreshold(long struct) { return UNSAFE.getFloat(null, struct + XrInteractionProfileAnalogThresholdVALVE.ONTHRESHOLD); } - /** Unsafe version of {@link #offThreshold}. */ - public static float noffThreshold(long struct) { return UNSAFE.getFloat(null, struct + XrInteractionProfileAnalogThresholdVALVE.OFFTHRESHOLD); } - /** Unsafe version of {@link #onHaptic}. */ - @Nullable public static XrHapticBaseHeader nonHaptic(long struct) { return XrHapticBaseHeader.createSafe(memGetAddress(struct + XrInteractionProfileAnalogThresholdVALVE.ONHAPTIC)); } - /** Unsafe version of {@link #offHaptic}. */ - @Nullable public static XrHapticBaseHeader noffHaptic(long struct) { return XrHapticBaseHeader.createSafe(memGetAddress(struct + XrInteractionProfileAnalogThresholdVALVE.OFFHAPTIC)); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrInteractionProfileAnalogThresholdVALVE.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrInteractionProfileAnalogThresholdVALVE.NEXT, value); } - /** Unsafe version of {@link #action(XrAction) action}. */ - public static void naction(long struct, XrAction value) { memPutAddress(struct + XrInteractionProfileAnalogThresholdVALVE.ACTION, value.address()); } - /** Unsafe version of {@link #binding(long) binding}. */ - public static void nbinding(long struct, long value) { UNSAFE.putLong(null, struct + XrInteractionProfileAnalogThresholdVALVE.BINDING, value); } - /** Unsafe version of {@link #onThreshold(float) onThreshold}. */ - public static void nonThreshold(long struct, float value) { UNSAFE.putFloat(null, struct + XrInteractionProfileAnalogThresholdVALVE.ONTHRESHOLD, value); } - /** Unsafe version of {@link #offThreshold(float) offThreshold}. */ - public static void noffThreshold(long struct, float value) { UNSAFE.putFloat(null, struct + XrInteractionProfileAnalogThresholdVALVE.OFFTHRESHOLD, value); } - /** Unsafe version of {@link #onHaptic(XrHapticBaseHeader) onHaptic}. */ - public static void nonHaptic(long struct, @Nullable XrHapticBaseHeader value) { memPutAddress(struct + XrInteractionProfileAnalogThresholdVALVE.ONHAPTIC, memAddressSafe(value)); } - /** Unsafe version of {@link #offHaptic(XrHapticBaseHeader) offHaptic}. */ - public static void noffHaptic(long struct, @Nullable XrHapticBaseHeader value) { memPutAddress(struct + XrInteractionProfileAnalogThresholdVALVE.OFFHAPTIC, memAddressSafe(value)); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XrInteractionProfileAnalogThresholdVALVE.ACTION)); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrInteractionProfileAnalogThresholdVALVE} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrInteractionProfileAnalogThresholdVALVE ELEMENT_FACTORY = XrInteractionProfileAnalogThresholdVALVE.create(-1L); - - /** - * Creates a new {@code XrInteractionProfileAnalogThresholdVALVE.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrInteractionProfileAnalogThresholdVALVE#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrInteractionProfileAnalogThresholdVALVE getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrInteractionProfileAnalogThresholdVALVE.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrInteractionProfileAnalogThresholdVALVE.nnext(address()); } - /** @return the value of the {@code action} field. */ - @NativeType("XrAction") - public long action() { return XrInteractionProfileAnalogThresholdVALVE.naction(address()); } - /** @return the value of the {@code binding} field. */ - @NativeType("XrPath") - public long binding() { return XrInteractionProfileAnalogThresholdVALVE.nbinding(address()); } - /** @return the value of the {@code onThreshold} field. */ - public float onThreshold() { return XrInteractionProfileAnalogThresholdVALVE.nonThreshold(address()); } - /** @return the value of the {@code offThreshold} field. */ - public float offThreshold() { return XrInteractionProfileAnalogThresholdVALVE.noffThreshold(address()); } - /** @return a {@link XrHapticBaseHeader} view of the struct pointed to by the {@code onHaptic} field. */ - @Nullable - @NativeType("XrHapticBaseHeader const *") - public XrHapticBaseHeader onHaptic() { return XrInteractionProfileAnalogThresholdVALVE.nonHaptic(address()); } - /** @return a {@link XrHapticBaseHeader} view of the struct pointed to by the {@code offHaptic} field. */ - @Nullable - @NativeType("XrHapticBaseHeader const *") - public XrHapticBaseHeader offHaptic() { return XrInteractionProfileAnalogThresholdVALVE.noffHaptic(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrInteractionProfileAnalogThresholdVALVE.ntype(address(), value); return this; } - /** Sets the {@link VALVEAnalogThreshold#XR_TYPE_INTERACTION_PROFILE_ANALOG_THRESHOLD_VALVE TYPE_INTERACTION_PROFILE_ANALOG_THRESHOLD_VALVE} value to the {@code type} field. */ - public Buffer type$Default() { return type(VALVEAnalogThreshold.XR_TYPE_INTERACTION_PROFILE_ANALOG_THRESHOLD_VALVE); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrInteractionProfileAnalogThresholdVALVE.nnext(address(), value); return this; } - /** Sets the specified value to the {@code action} field. */ - public Buffer action(XrAction value) { XrInteractionProfileAnalogThresholdVALVE.naction(address(), value); return this; } - /** Sets the specified value to the {@code binding} field. */ - public Buffer binding(@NativeType("XrPath") long value) { XrInteractionProfileAnalogThresholdVALVE.nbinding(address(), value); return this; } - /** Sets the specified value to the {@code onThreshold} field. */ - public Buffer onThreshold(float value) { XrInteractionProfileAnalogThresholdVALVE.nonThreshold(address(), value); return this; } - /** Sets the specified value to the {@code offThreshold} field. */ - public Buffer offThreshold(float value) { XrInteractionProfileAnalogThresholdVALVE.noffThreshold(address(), value); return this; } - /** Sets the address of the specified {@link XrHapticBaseHeader} to the {@code onHaptic} field. */ - public Buffer onHaptic(@Nullable @NativeType("XrHapticBaseHeader const *") XrHapticBaseHeader value) { XrInteractionProfileAnalogThresholdVALVE.nonHaptic(address(), value); return this; } - /** Sets the address of the specified {@link XrHapticBaseHeader} to the {@code offHaptic} field. */ - public Buffer offHaptic(@Nullable @NativeType("XrHapticBaseHeader const *") XrHapticBaseHeader value) { XrInteractionProfileAnalogThresholdVALVE.noffHaptic(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrInteractionProfileState.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrInteractionProfileState.java deleted file mode 100644 index de2a87eb..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrInteractionProfileState.java +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrInteractionProfileState {
- *     XrStructureType type;
- *     void * next;
- *     XrPath interactionProfile;
- * }
- */ -public class XrInteractionProfileState extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - INTERACTIONPROFILE; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(8) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - INTERACTIONPROFILE = layout.offsetof(2); - } - - /** - * Creates a {@code XrInteractionProfileState} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrInteractionProfileState(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return the value of the {@code interactionProfile} field. */ - @NativeType("XrPath") - public long interactionProfile() { return ninteractionProfile(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrInteractionProfileState type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_INTERACTION_PROFILE_STATE TYPE_INTERACTION_PROFILE_STATE} value to the {@code type} field. */ - public XrInteractionProfileState type$Default() { return type(XR10.XR_TYPE_INTERACTION_PROFILE_STATE); } - /** Sets the specified value to the {@code next} field. */ - public XrInteractionProfileState next(@NativeType("void *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code interactionProfile} field. */ - public XrInteractionProfileState interactionProfile(@NativeType("XrPath") long value) { ninteractionProfile(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrInteractionProfileState set( - int type, - long next, - long interactionProfile - ) { - type(type); - next(next); - interactionProfile(interactionProfile); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrInteractionProfileState set(XrInteractionProfileState src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrInteractionProfileState} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrInteractionProfileState malloc() { - return wrap(XrInteractionProfileState.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrInteractionProfileState} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrInteractionProfileState calloc() { - return wrap(XrInteractionProfileState.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrInteractionProfileState} instance allocated with {@link BufferUtils}. */ - public static XrInteractionProfileState create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrInteractionProfileState.class, memAddress(container), container); - } - - /** Returns a new {@code XrInteractionProfileState} instance for the specified memory address. */ - public static XrInteractionProfileState create(long address) { - return wrap(XrInteractionProfileState.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrInteractionProfileState createSafe(long address) { - return address == NULL ? null : wrap(XrInteractionProfileState.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrInteractionProfileState.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrInteractionProfileState} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrInteractionProfileState malloc(MemoryStack stack) { - return wrap(XrInteractionProfileState.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrInteractionProfileState} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrInteractionProfileState calloc(MemoryStack stack) { - return wrap(XrInteractionProfileState.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrInteractionProfileState.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrInteractionProfileState.NEXT); } - /** Unsafe version of {@link #interactionProfile}. */ - public static long ninteractionProfile(long struct) { return UNSAFE.getLong(null, struct + XrInteractionProfileState.INTERACTIONPROFILE); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrInteractionProfileState.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrInteractionProfileState.NEXT, value); } - /** Unsafe version of {@link #interactionProfile(long) interactionProfile}. */ - public static void ninteractionProfile(long struct, long value) { UNSAFE.putLong(null, struct + XrInteractionProfileState.INTERACTIONPROFILE, value); } - - // ----------------------------------- - - /** An array of {@link XrInteractionProfileState} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrInteractionProfileState ELEMENT_FACTORY = XrInteractionProfileState.create(-1L); - - /** - * Creates a new {@code XrInteractionProfileState.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrInteractionProfileState#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrInteractionProfileState getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrInteractionProfileState.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrInteractionProfileState.nnext(address()); } - /** @return the value of the {@code interactionProfile} field. */ - @NativeType("XrPath") - public long interactionProfile() { return XrInteractionProfileState.ninteractionProfile(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrInteractionProfileState.ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_INTERACTION_PROFILE_STATE TYPE_INTERACTION_PROFILE_STATE} value to the {@code type} field. */ - public Buffer type$Default() { return type(XR10.XR_TYPE_INTERACTION_PROFILE_STATE); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrInteractionProfileState.nnext(address(), value); return this; } - /** Sets the specified value to the {@code interactionProfile} field. */ - public Buffer interactionProfile(@NativeType("XrPath") long value) { XrInteractionProfileState.ninteractionProfile(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrInteractionProfileSuggestedBinding.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrInteractionProfileSuggestedBinding.java deleted file mode 100644 index b4390d7f..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrInteractionProfileSuggestedBinding.java +++ /dev/null @@ -1,358 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrInteractionProfileSuggestedBinding {
- *     XrStructureType type;
- *     void const * next;
- *     XrPath interactionProfile;
- *     uint32_t countSuggestedBindings;
- *     {@link XrActionSuggestedBinding XrActionSuggestedBinding} const * suggestedBindings;
- * }
- */ -public class XrInteractionProfileSuggestedBinding extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - INTERACTIONPROFILE, - COUNTSUGGESTEDBINDINGS, - SUGGESTEDBINDINGS; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(8), - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - INTERACTIONPROFILE = layout.offsetof(2); - COUNTSUGGESTEDBINDINGS = layout.offsetof(3); - SUGGESTEDBINDINGS = layout.offsetof(4); - } - - /** - * Creates a {@code XrInteractionProfileSuggestedBinding} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrInteractionProfileSuggestedBinding(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code interactionProfile} field. */ - @NativeType("XrPath") - public long interactionProfile() { return ninteractionProfile(address()); } - /** @return the value of the {@code countSuggestedBindings} field. */ - @NativeType("uint32_t") - public int countSuggestedBindings() { return ncountSuggestedBindings(address()); } - /** @return a {@link XrActionSuggestedBinding.Buffer} view of the struct array pointed to by the {@code suggestedBindings} field. */ - @NativeType("XrActionSuggestedBinding const *") - public XrActionSuggestedBinding.Buffer suggestedBindings() { return nsuggestedBindings(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrInteractionProfileSuggestedBinding type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_INTERACTION_PROFILE_SUGGESTED_BINDING TYPE_INTERACTION_PROFILE_SUGGESTED_BINDING} value to the {@code type} field. */ - public XrInteractionProfileSuggestedBinding type$Default() { return type(XR10.XR_TYPE_INTERACTION_PROFILE_SUGGESTED_BINDING); } - /** Sets the specified value to the {@code next} field. */ - public XrInteractionProfileSuggestedBinding next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code interactionProfile} field. */ - public XrInteractionProfileSuggestedBinding interactionProfile(@NativeType("XrPath") long value) { ninteractionProfile(address(), value); return this; } - /** Sets the address of the specified {@link XrActionSuggestedBinding.Buffer} to the {@code suggestedBindings} field. */ - public XrInteractionProfileSuggestedBinding suggestedBindings(@NativeType("XrActionSuggestedBinding const *") XrActionSuggestedBinding.Buffer value) { nsuggestedBindings(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrInteractionProfileSuggestedBinding set( - int type, - long next, - long interactionProfile, - XrActionSuggestedBinding.Buffer suggestedBindings - ) { - type(type); - next(next); - interactionProfile(interactionProfile); - suggestedBindings(suggestedBindings); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrInteractionProfileSuggestedBinding set(XrInteractionProfileSuggestedBinding src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrInteractionProfileSuggestedBinding} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrInteractionProfileSuggestedBinding malloc() { - return wrap(XrInteractionProfileSuggestedBinding.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrInteractionProfileSuggestedBinding} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrInteractionProfileSuggestedBinding calloc() { - return wrap(XrInteractionProfileSuggestedBinding.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrInteractionProfileSuggestedBinding} instance allocated with {@link BufferUtils}. */ - public static XrInteractionProfileSuggestedBinding create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrInteractionProfileSuggestedBinding.class, memAddress(container), container); - } - - /** Returns a new {@code XrInteractionProfileSuggestedBinding} instance for the specified memory address. */ - public static XrInteractionProfileSuggestedBinding create(long address) { - return wrap(XrInteractionProfileSuggestedBinding.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrInteractionProfileSuggestedBinding createSafe(long address) { - return address == NULL ? null : wrap(XrInteractionProfileSuggestedBinding.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrInteractionProfileSuggestedBinding.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrInteractionProfileSuggestedBinding} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrInteractionProfileSuggestedBinding malloc(MemoryStack stack) { - return wrap(XrInteractionProfileSuggestedBinding.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrInteractionProfileSuggestedBinding} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrInteractionProfileSuggestedBinding calloc(MemoryStack stack) { - return wrap(XrInteractionProfileSuggestedBinding.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrInteractionProfileSuggestedBinding.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrInteractionProfileSuggestedBinding.NEXT); } - /** Unsafe version of {@link #interactionProfile}. */ - public static long ninteractionProfile(long struct) { return UNSAFE.getLong(null, struct + XrInteractionProfileSuggestedBinding.INTERACTIONPROFILE); } - /** Unsafe version of {@link #countSuggestedBindings}. */ - public static int ncountSuggestedBindings(long struct) { return UNSAFE.getInt(null, struct + XrInteractionProfileSuggestedBinding.COUNTSUGGESTEDBINDINGS); } - /** Unsafe version of {@link #suggestedBindings}. */ - public static XrActionSuggestedBinding.Buffer nsuggestedBindings(long struct) { return XrActionSuggestedBinding.create(memGetAddress(struct + XrInteractionProfileSuggestedBinding.SUGGESTEDBINDINGS), ncountSuggestedBindings(struct)); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrInteractionProfileSuggestedBinding.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrInteractionProfileSuggestedBinding.NEXT, value); } - /** Unsafe version of {@link #interactionProfile(long) interactionProfile}. */ - public static void ninteractionProfile(long struct, long value) { UNSAFE.putLong(null, struct + XrInteractionProfileSuggestedBinding.INTERACTIONPROFILE, value); } - /** Sets the specified value to the {@code countSuggestedBindings} field of the specified {@code struct}. */ - public static void ncountSuggestedBindings(long struct, int value) { UNSAFE.putInt(null, struct + XrInteractionProfileSuggestedBinding.COUNTSUGGESTEDBINDINGS, value); } - /** Unsafe version of {@link #suggestedBindings(XrActionSuggestedBinding.Buffer) suggestedBindings}. */ - public static void nsuggestedBindings(long struct, XrActionSuggestedBinding.Buffer value) { memPutAddress(struct + XrInteractionProfileSuggestedBinding.SUGGESTEDBINDINGS, value.address()); ncountSuggestedBindings(struct, value.remaining()); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - int countSuggestedBindings = ncountSuggestedBindings(struct); - long suggestedBindings = memGetAddress(struct + XrInteractionProfileSuggestedBinding.SUGGESTEDBINDINGS); - check(suggestedBindings); - XrActionSuggestedBinding.validate(suggestedBindings, countSuggestedBindings); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrInteractionProfileSuggestedBinding} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrInteractionProfileSuggestedBinding ELEMENT_FACTORY = XrInteractionProfileSuggestedBinding.create(-1L); - - /** - * Creates a new {@code XrInteractionProfileSuggestedBinding.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrInteractionProfileSuggestedBinding#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrInteractionProfileSuggestedBinding getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrInteractionProfileSuggestedBinding.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrInteractionProfileSuggestedBinding.nnext(address()); } - /** @return the value of the {@code interactionProfile} field. */ - @NativeType("XrPath") - public long interactionProfile() { return XrInteractionProfileSuggestedBinding.ninteractionProfile(address()); } - /** @return the value of the {@code countSuggestedBindings} field. */ - @NativeType("uint32_t") - public int countSuggestedBindings() { return XrInteractionProfileSuggestedBinding.ncountSuggestedBindings(address()); } - /** @return a {@link XrActionSuggestedBinding.Buffer} view of the struct array pointed to by the {@code suggestedBindings} field. */ - @NativeType("XrActionSuggestedBinding const *") - public XrActionSuggestedBinding.Buffer suggestedBindings() { return XrInteractionProfileSuggestedBinding.nsuggestedBindings(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrInteractionProfileSuggestedBinding.ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_INTERACTION_PROFILE_SUGGESTED_BINDING TYPE_INTERACTION_PROFILE_SUGGESTED_BINDING} value to the {@code type} field. */ - public Buffer type$Default() { return type(XR10.XR_TYPE_INTERACTION_PROFILE_SUGGESTED_BINDING); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrInteractionProfileSuggestedBinding.nnext(address(), value); return this; } - /** Sets the specified value to the {@code interactionProfile} field. */ - public Buffer interactionProfile(@NativeType("XrPath") long value) { XrInteractionProfileSuggestedBinding.ninteractionProfile(address(), value); return this; } - /** Sets the address of the specified {@link XrActionSuggestedBinding.Buffer} to the {@code suggestedBindings} field. */ - public Buffer suggestedBindings(@NativeType("XrActionSuggestedBinding const *") XrActionSuggestedBinding.Buffer value) { XrInteractionProfileSuggestedBinding.nsuggestedBindings(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrLoaderInitInfoAndroidKHR.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrLoaderInitInfoAndroidKHR.java deleted file mode 100644 index 59cf2d64..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrLoaderInitInfoAndroidKHR.java +++ /dev/null @@ -1,342 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrLoaderInitInfoAndroidKHR {
- *     XrStructureType type;
- *     void const * next;
- *     void * applicationVM;
- *     void * applicationContext;
- * }
- */ -public class XrLoaderInitInfoAndroidKHR extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - APPLICATIONVM, - APPLICATIONCONTEXT; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - APPLICATIONVM = layout.offsetof(2); - APPLICATIONCONTEXT = layout.offsetof(3); - } - - /** - * Creates a {@code XrLoaderInitInfoAndroidKHR} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrLoaderInitInfoAndroidKHR(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code applicationVM} field. */ - @NativeType("void *") - public long applicationVM() { return napplicationVM(address()); } - /** @return the value of the {@code applicationContext} field. */ - @NativeType("void *") - public long applicationContext() { return napplicationContext(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrLoaderInitInfoAndroidKHR type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link KHRLoaderInitAndroid#XR_TYPE_LOADER_INIT_INFO_ANDROID_KHR TYPE_LOADER_INIT_INFO_ANDROID_KHR} value to the {@code type} field. */ - public XrLoaderInitInfoAndroidKHR type$Default() { return type(KHRLoaderInitAndroid.XR_TYPE_LOADER_INIT_INFO_ANDROID_KHR); } - /** Sets the specified value to the {@code next} field. */ - public XrLoaderInitInfoAndroidKHR next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code applicationVM} field. */ - public XrLoaderInitInfoAndroidKHR applicationVM(@NativeType("void *") long value) { napplicationVM(address(), value); return this; } - /** Sets the specified value to the {@code applicationContext} field. */ - public XrLoaderInitInfoAndroidKHR applicationContext(@NativeType("void *") long value) { napplicationContext(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrLoaderInitInfoAndroidKHR set( - int type, - long next, - long applicationVM, - long applicationContext - ) { - type(type); - next(next); - applicationVM(applicationVM); - applicationContext(applicationContext); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrLoaderInitInfoAndroidKHR set(XrLoaderInitInfoAndroidKHR src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrLoaderInitInfoAndroidKHR} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrLoaderInitInfoAndroidKHR malloc() { - return wrap(XrLoaderInitInfoAndroidKHR.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrLoaderInitInfoAndroidKHR} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrLoaderInitInfoAndroidKHR calloc() { - return wrap(XrLoaderInitInfoAndroidKHR.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrLoaderInitInfoAndroidKHR} instance allocated with {@link BufferUtils}. */ - public static XrLoaderInitInfoAndroidKHR create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrLoaderInitInfoAndroidKHR.class, memAddress(container), container); - } - - /** Returns a new {@code XrLoaderInitInfoAndroidKHR} instance for the specified memory address. */ - public static XrLoaderInitInfoAndroidKHR create(long address) { - return wrap(XrLoaderInitInfoAndroidKHR.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrLoaderInitInfoAndroidKHR createSafe(long address) { - return address == NULL ? null : wrap(XrLoaderInitInfoAndroidKHR.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrLoaderInitInfoAndroidKHR.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrLoaderInitInfoAndroidKHR} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrLoaderInitInfoAndroidKHR malloc(MemoryStack stack) { - return wrap(XrLoaderInitInfoAndroidKHR.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrLoaderInitInfoAndroidKHR} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrLoaderInitInfoAndroidKHR calloc(MemoryStack stack) { - return wrap(XrLoaderInitInfoAndroidKHR.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrLoaderInitInfoAndroidKHR.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrLoaderInitInfoAndroidKHR.NEXT); } - /** Unsafe version of {@link #applicationVM}. */ - public static long napplicationVM(long struct) { return memGetAddress(struct + XrLoaderInitInfoAndroidKHR.APPLICATIONVM); } - /** Unsafe version of {@link #applicationContext}. */ - public static long napplicationContext(long struct) { return memGetAddress(struct + XrLoaderInitInfoAndroidKHR.APPLICATIONCONTEXT); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrLoaderInitInfoAndroidKHR.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrLoaderInitInfoAndroidKHR.NEXT, value); } - /** Unsafe version of {@link #applicationVM(long) applicationVM}. */ - public static void napplicationVM(long struct, long value) { memPutAddress(struct + XrLoaderInitInfoAndroidKHR.APPLICATIONVM, check(value)); } - /** Unsafe version of {@link #applicationContext(long) applicationContext}. */ - public static void napplicationContext(long struct, long value) { memPutAddress(struct + XrLoaderInitInfoAndroidKHR.APPLICATIONCONTEXT, check(value)); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XrLoaderInitInfoAndroidKHR.APPLICATIONVM)); - check(memGetAddress(struct + XrLoaderInitInfoAndroidKHR.APPLICATIONCONTEXT)); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrLoaderInitInfoAndroidKHR} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrLoaderInitInfoAndroidKHR ELEMENT_FACTORY = XrLoaderInitInfoAndroidKHR.create(-1L); - - /** - * Creates a new {@code XrLoaderInitInfoAndroidKHR.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrLoaderInitInfoAndroidKHR#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrLoaderInitInfoAndroidKHR getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrLoaderInitInfoAndroidKHR.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrLoaderInitInfoAndroidKHR.nnext(address()); } - /** @return the value of the {@code applicationVM} field. */ - @NativeType("void *") - public long applicationVM() { return XrLoaderInitInfoAndroidKHR.napplicationVM(address()); } - /** @return the value of the {@code applicationContext} field. */ - @NativeType("void *") - public long applicationContext() { return XrLoaderInitInfoAndroidKHR.napplicationContext(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrLoaderInitInfoAndroidKHR.ntype(address(), value); return this; } - /** Sets the {@link KHRLoaderInitAndroid#XR_TYPE_LOADER_INIT_INFO_ANDROID_KHR TYPE_LOADER_INIT_INFO_ANDROID_KHR} value to the {@code type} field. */ - public Buffer type$Default() { return type(KHRLoaderInitAndroid.XR_TYPE_LOADER_INIT_INFO_ANDROID_KHR); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrLoaderInitInfoAndroidKHR.nnext(address(), value); return this; } - /** Sets the specified value to the {@code applicationVM} field. */ - public Buffer applicationVM(@NativeType("void *") long value) { XrLoaderInitInfoAndroidKHR.napplicationVM(address(), value); return this; } - /** Sets the specified value to the {@code applicationContext} field. */ - public Buffer applicationContext(@NativeType("void *") long value) { XrLoaderInitInfoAndroidKHR.napplicationContext(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrLoaderInitInfoBaseHeaderKHR.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrLoaderInitInfoBaseHeaderKHR.java deleted file mode 100644 index ed10d65a..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrLoaderInitInfoBaseHeaderKHR.java +++ /dev/null @@ -1,275 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrLoaderInitInfoBaseHeaderKHR {
- *     XrStructureType type;
- *     void const * next;
- * }
- */ -public class XrLoaderInitInfoBaseHeaderKHR extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - } - - /** - * Creates a {@code XrLoaderInitInfoBaseHeaderKHR} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrLoaderInitInfoBaseHeaderKHR(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrLoaderInitInfoBaseHeaderKHR type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the specified value to the {@code next} field. */ - public XrLoaderInitInfoBaseHeaderKHR next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrLoaderInitInfoBaseHeaderKHR set( - int type, - long next - ) { - type(type); - next(next); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrLoaderInitInfoBaseHeaderKHR set(XrLoaderInitInfoBaseHeaderKHR src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrLoaderInitInfoBaseHeaderKHR} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrLoaderInitInfoBaseHeaderKHR malloc() { - return wrap(XrLoaderInitInfoBaseHeaderKHR.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrLoaderInitInfoBaseHeaderKHR} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrLoaderInitInfoBaseHeaderKHR calloc() { - return wrap(XrLoaderInitInfoBaseHeaderKHR.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrLoaderInitInfoBaseHeaderKHR} instance allocated with {@link BufferUtils}. */ - public static XrLoaderInitInfoBaseHeaderKHR create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrLoaderInitInfoBaseHeaderKHR.class, memAddress(container), container); - } - - /** Returns a new {@code XrLoaderInitInfoBaseHeaderKHR} instance for the specified memory address. */ - public static XrLoaderInitInfoBaseHeaderKHR create(long address) { - return wrap(XrLoaderInitInfoBaseHeaderKHR.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrLoaderInitInfoBaseHeaderKHR createSafe(long address) { - return address == NULL ? null : wrap(XrLoaderInitInfoBaseHeaderKHR.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrLoaderInitInfoBaseHeaderKHR.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrLoaderInitInfoBaseHeaderKHR} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrLoaderInitInfoBaseHeaderKHR malloc(MemoryStack stack) { - return wrap(XrLoaderInitInfoBaseHeaderKHR.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrLoaderInitInfoBaseHeaderKHR} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrLoaderInitInfoBaseHeaderKHR calloc(MemoryStack stack) { - return wrap(XrLoaderInitInfoBaseHeaderKHR.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrLoaderInitInfoBaseHeaderKHR.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrLoaderInitInfoBaseHeaderKHR.NEXT); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrLoaderInitInfoBaseHeaderKHR.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrLoaderInitInfoBaseHeaderKHR.NEXT, value); } - - // ----------------------------------- - - /** An array of {@link XrLoaderInitInfoBaseHeaderKHR} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrLoaderInitInfoBaseHeaderKHR ELEMENT_FACTORY = XrLoaderInitInfoBaseHeaderKHR.create(-1L); - - /** - * Creates a new {@code XrLoaderInitInfoBaseHeaderKHR.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrLoaderInitInfoBaseHeaderKHR#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrLoaderInitInfoBaseHeaderKHR getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrLoaderInitInfoBaseHeaderKHR.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrLoaderInitInfoBaseHeaderKHR.nnext(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrLoaderInitInfoBaseHeaderKHR.ntype(address(), value); return this; } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrLoaderInitInfoBaseHeaderKHR.nnext(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrMarkerSpaceCreateInfoVARJO.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrMarkerSpaceCreateInfoVARJO.java deleted file mode 100644 index e8ebe7cb..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrMarkerSpaceCreateInfoVARJO.java +++ /dev/null @@ -1,321 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrMarkerSpaceCreateInfoVARJO {
- *     XrStructureType type;
- *     void const * next;
- *     uint64_t markerId;
- *     {@link XrPosef XrPosef} poseInMarkerSpace;
- * }
- */ -public class XrMarkerSpaceCreateInfoVARJO extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - MARKERID, - POSEINMARKERSPACE; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(8), - __member(XrPosef.SIZEOF, XrPosef.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - MARKERID = layout.offsetof(2); - POSEINMARKERSPACE = layout.offsetof(3); - } - - /** - * Creates a {@code XrMarkerSpaceCreateInfoVARJO} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrMarkerSpaceCreateInfoVARJO(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code markerId} field. */ - @NativeType("uint64_t") - public long markerId() { return nmarkerId(address()); } - /** @return a {@link XrPosef} view of the {@code poseInMarkerSpace} field. */ - public XrPosef poseInMarkerSpace() { return nposeInMarkerSpace(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrMarkerSpaceCreateInfoVARJO type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link VARJOMarkerTracking#XR_TYPE_MARKER_SPACE_CREATE_INFO_VARJO TYPE_MARKER_SPACE_CREATE_INFO_VARJO} value to the {@code type} field. */ - public XrMarkerSpaceCreateInfoVARJO type$Default() { return type(VARJOMarkerTracking.XR_TYPE_MARKER_SPACE_CREATE_INFO_VARJO); } - /** Sets the specified value to the {@code next} field. */ - public XrMarkerSpaceCreateInfoVARJO next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code markerId} field. */ - public XrMarkerSpaceCreateInfoVARJO markerId(@NativeType("uint64_t") long value) { nmarkerId(address(), value); return this; } - /** Copies the specified {@link XrPosef} to the {@code poseInMarkerSpace} field. */ - public XrMarkerSpaceCreateInfoVARJO poseInMarkerSpace(XrPosef value) { nposeInMarkerSpace(address(), value); return this; } - /** Passes the {@code poseInMarkerSpace} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrMarkerSpaceCreateInfoVARJO poseInMarkerSpace(java.util.function.Consumer consumer) { consumer.accept(poseInMarkerSpace()); return this; } - - /** Initializes this struct with the specified values. */ - public XrMarkerSpaceCreateInfoVARJO set( - int type, - long next, - long markerId, - XrPosef poseInMarkerSpace - ) { - type(type); - next(next); - markerId(markerId); - poseInMarkerSpace(poseInMarkerSpace); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrMarkerSpaceCreateInfoVARJO set(XrMarkerSpaceCreateInfoVARJO src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrMarkerSpaceCreateInfoVARJO} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrMarkerSpaceCreateInfoVARJO malloc() { - return wrap(XrMarkerSpaceCreateInfoVARJO.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrMarkerSpaceCreateInfoVARJO} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrMarkerSpaceCreateInfoVARJO calloc() { - return wrap(XrMarkerSpaceCreateInfoVARJO.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrMarkerSpaceCreateInfoVARJO} instance allocated with {@link BufferUtils}. */ - public static XrMarkerSpaceCreateInfoVARJO create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrMarkerSpaceCreateInfoVARJO.class, memAddress(container), container); - } - - /** Returns a new {@code XrMarkerSpaceCreateInfoVARJO} instance for the specified memory address. */ - public static XrMarkerSpaceCreateInfoVARJO create(long address) { - return wrap(XrMarkerSpaceCreateInfoVARJO.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrMarkerSpaceCreateInfoVARJO createSafe(long address) { - return address == NULL ? null : wrap(XrMarkerSpaceCreateInfoVARJO.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrMarkerSpaceCreateInfoVARJO.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrMarkerSpaceCreateInfoVARJO} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrMarkerSpaceCreateInfoVARJO malloc(MemoryStack stack) { - return wrap(XrMarkerSpaceCreateInfoVARJO.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrMarkerSpaceCreateInfoVARJO} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrMarkerSpaceCreateInfoVARJO calloc(MemoryStack stack) { - return wrap(XrMarkerSpaceCreateInfoVARJO.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrMarkerSpaceCreateInfoVARJO.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrMarkerSpaceCreateInfoVARJO.NEXT); } - /** Unsafe version of {@link #markerId}. */ - public static long nmarkerId(long struct) { return UNSAFE.getLong(null, struct + XrMarkerSpaceCreateInfoVARJO.MARKERID); } - /** Unsafe version of {@link #poseInMarkerSpace}. */ - public static XrPosef nposeInMarkerSpace(long struct) { return XrPosef.create(struct + XrMarkerSpaceCreateInfoVARJO.POSEINMARKERSPACE); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrMarkerSpaceCreateInfoVARJO.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrMarkerSpaceCreateInfoVARJO.NEXT, value); } - /** Unsafe version of {@link #markerId(long) markerId}. */ - public static void nmarkerId(long struct, long value) { UNSAFE.putLong(null, struct + XrMarkerSpaceCreateInfoVARJO.MARKERID, value); } - /** Unsafe version of {@link #poseInMarkerSpace(XrPosef) poseInMarkerSpace}. */ - public static void nposeInMarkerSpace(long struct, XrPosef value) { memCopy(value.address(), struct + XrMarkerSpaceCreateInfoVARJO.POSEINMARKERSPACE, XrPosef.SIZEOF); } - - // ----------------------------------- - - /** An array of {@link XrMarkerSpaceCreateInfoVARJO} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrMarkerSpaceCreateInfoVARJO ELEMENT_FACTORY = XrMarkerSpaceCreateInfoVARJO.create(-1L); - - /** - * Creates a new {@code XrMarkerSpaceCreateInfoVARJO.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrMarkerSpaceCreateInfoVARJO#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrMarkerSpaceCreateInfoVARJO getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrMarkerSpaceCreateInfoVARJO.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrMarkerSpaceCreateInfoVARJO.nnext(address()); } - /** @return the value of the {@code markerId} field. */ - @NativeType("uint64_t") - public long markerId() { return XrMarkerSpaceCreateInfoVARJO.nmarkerId(address()); } - /** @return a {@link XrPosef} view of the {@code poseInMarkerSpace} field. */ - public XrPosef poseInMarkerSpace() { return XrMarkerSpaceCreateInfoVARJO.nposeInMarkerSpace(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrMarkerSpaceCreateInfoVARJO.ntype(address(), value); return this; } - /** Sets the {@link VARJOMarkerTracking#XR_TYPE_MARKER_SPACE_CREATE_INFO_VARJO TYPE_MARKER_SPACE_CREATE_INFO_VARJO} value to the {@code type} field. */ - public Buffer type$Default() { return type(VARJOMarkerTracking.XR_TYPE_MARKER_SPACE_CREATE_INFO_VARJO); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrMarkerSpaceCreateInfoVARJO.nnext(address(), value); return this; } - /** Sets the specified value to the {@code markerId} field. */ - public Buffer markerId(@NativeType("uint64_t") long value) { XrMarkerSpaceCreateInfoVARJO.nmarkerId(address(), value); return this; } - /** Copies the specified {@link XrPosef} to the {@code poseInMarkerSpace} field. */ - public Buffer poseInMarkerSpace(XrPosef value) { XrMarkerSpaceCreateInfoVARJO.nposeInMarkerSpace(address(), value); return this; } - /** Passes the {@code poseInMarkerSpace} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer poseInMarkerSpace(java.util.function.Consumer consumer) { consumer.accept(poseInMarkerSpace()); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrNewSceneComputeInfoMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrNewSceneComputeInfoMSFT.java deleted file mode 100644 index c1e13dd7..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrNewSceneComputeInfoMSFT.java +++ /dev/null @@ -1,379 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; -import java.nio.IntBuffer; - -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrNewSceneComputeInfoMSFT {
- *     XrStructureType type;
- *     void const * next;
- *     uint32_t requestedFeatureCount;
- *     XrSceneComputeFeatureMSFT const * requestedFeatures;
- *     XrSceneComputeConsistencyMSFT consistency;
- *     {@link XrSceneBoundsMSFT XrSceneBoundsMSFT} bounds;
- * }
- */ -public class XrNewSceneComputeInfoMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - REQUESTEDFEATURECOUNT, - REQUESTEDFEATURES, - CONSISTENCY, - BOUNDS; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(XrSceneBoundsMSFT.SIZEOF, XrSceneBoundsMSFT.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - REQUESTEDFEATURECOUNT = layout.offsetof(2); - REQUESTEDFEATURES = layout.offsetof(3); - CONSISTENCY = layout.offsetof(4); - BOUNDS = layout.offsetof(5); - } - - /** - * Creates a {@code XrNewSceneComputeInfoMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrNewSceneComputeInfoMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code requestedFeatureCount} field. */ - @NativeType("uint32_t") - public int requestedFeatureCount() { return nrequestedFeatureCount(address()); } - /** @return a {@link IntBuffer} view of the data pointed to by the {@code requestedFeatures} field. */ - @NativeType("XrSceneComputeFeatureMSFT const *") - public IntBuffer requestedFeatures() { return nrequestedFeatures(address()); } - /** @return the value of the {@code consistency} field. */ - @NativeType("XrSceneComputeConsistencyMSFT") - public int consistency() { return nconsistency(address()); } - /** @return a {@link XrSceneBoundsMSFT} view of the {@code bounds} field. */ - public XrSceneBoundsMSFT bounds() { return nbounds(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrNewSceneComputeInfoMSFT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link MSFTSceneUnderstanding#XR_TYPE_NEW_SCENE_COMPUTE_INFO_MSFT TYPE_NEW_SCENE_COMPUTE_INFO_MSFT} value to the {@code type} field. */ - public XrNewSceneComputeInfoMSFT type$Default() { return type(MSFTSceneUnderstanding.XR_TYPE_NEW_SCENE_COMPUTE_INFO_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public XrNewSceneComputeInfoMSFT next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the address of the specified {@link IntBuffer} to the {@code requestedFeatures} field. */ - public XrNewSceneComputeInfoMSFT requestedFeatures(@NativeType("XrSceneComputeFeatureMSFT const *") IntBuffer value) { nrequestedFeatures(address(), value); return this; } - /** Sets the specified value to the {@code consistency} field. */ - public XrNewSceneComputeInfoMSFT consistency(@NativeType("XrSceneComputeConsistencyMSFT") int value) { nconsistency(address(), value); return this; } - /** Copies the specified {@link XrSceneBoundsMSFT} to the {@code bounds} field. */ - public XrNewSceneComputeInfoMSFT bounds(XrSceneBoundsMSFT value) { nbounds(address(), value); return this; } - /** Passes the {@code bounds} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrNewSceneComputeInfoMSFT bounds(java.util.function.Consumer consumer) { consumer.accept(bounds()); return this; } - - /** Initializes this struct with the specified values. */ - public XrNewSceneComputeInfoMSFT set( - int type, - long next, - IntBuffer requestedFeatures, - int consistency, - XrSceneBoundsMSFT bounds - ) { - type(type); - next(next); - requestedFeatures(requestedFeatures); - consistency(consistency); - bounds(bounds); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrNewSceneComputeInfoMSFT set(XrNewSceneComputeInfoMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrNewSceneComputeInfoMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrNewSceneComputeInfoMSFT malloc() { - return wrap(XrNewSceneComputeInfoMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrNewSceneComputeInfoMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrNewSceneComputeInfoMSFT calloc() { - return wrap(XrNewSceneComputeInfoMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrNewSceneComputeInfoMSFT} instance allocated with {@link BufferUtils}. */ - public static XrNewSceneComputeInfoMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrNewSceneComputeInfoMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrNewSceneComputeInfoMSFT} instance for the specified memory address. */ - public static XrNewSceneComputeInfoMSFT create(long address) { - return wrap(XrNewSceneComputeInfoMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrNewSceneComputeInfoMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrNewSceneComputeInfoMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrNewSceneComputeInfoMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrNewSceneComputeInfoMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrNewSceneComputeInfoMSFT malloc(MemoryStack stack) { - return wrap(XrNewSceneComputeInfoMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrNewSceneComputeInfoMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrNewSceneComputeInfoMSFT calloc(MemoryStack stack) { - return wrap(XrNewSceneComputeInfoMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrNewSceneComputeInfoMSFT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrNewSceneComputeInfoMSFT.NEXT); } - /** Unsafe version of {@link #requestedFeatureCount}. */ - public static int nrequestedFeatureCount(long struct) { return UNSAFE.getInt(null, struct + XrNewSceneComputeInfoMSFT.REQUESTEDFEATURECOUNT); } - /** Unsafe version of {@link #requestedFeatures() requestedFeatures}. */ - public static IntBuffer nrequestedFeatures(long struct) { return memIntBuffer(memGetAddress(struct + XrNewSceneComputeInfoMSFT.REQUESTEDFEATURES), nrequestedFeatureCount(struct)); } - /** Unsafe version of {@link #consistency}. */ - public static int nconsistency(long struct) { return UNSAFE.getInt(null, struct + XrNewSceneComputeInfoMSFT.CONSISTENCY); } - /** Unsafe version of {@link #bounds}. */ - public static XrSceneBoundsMSFT nbounds(long struct) { return XrSceneBoundsMSFT.create(struct + XrNewSceneComputeInfoMSFT.BOUNDS); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrNewSceneComputeInfoMSFT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrNewSceneComputeInfoMSFT.NEXT, value); } - /** Sets the specified value to the {@code requestedFeatureCount} field of the specified {@code struct}. */ - public static void nrequestedFeatureCount(long struct, int value) { UNSAFE.putInt(null, struct + XrNewSceneComputeInfoMSFT.REQUESTEDFEATURECOUNT, value); } - /** Unsafe version of {@link #requestedFeatures(IntBuffer) requestedFeatures}. */ - public static void nrequestedFeatures(long struct, IntBuffer value) { memPutAddress(struct + XrNewSceneComputeInfoMSFT.REQUESTEDFEATURES, memAddress(value)); nrequestedFeatureCount(struct, value.remaining()); } - /** Unsafe version of {@link #consistency(int) consistency}. */ - public static void nconsistency(long struct, int value) { UNSAFE.putInt(null, struct + XrNewSceneComputeInfoMSFT.CONSISTENCY, value); } - /** Unsafe version of {@link #bounds(XrSceneBoundsMSFT) bounds}. */ - public static void nbounds(long struct, XrSceneBoundsMSFT value) { memCopy(value.address(), struct + XrNewSceneComputeInfoMSFT.BOUNDS, XrSceneBoundsMSFT.SIZEOF); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XrNewSceneComputeInfoMSFT.REQUESTEDFEATURES)); - XrSceneBoundsMSFT.validate(struct + XrNewSceneComputeInfoMSFT.BOUNDS); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrNewSceneComputeInfoMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrNewSceneComputeInfoMSFT ELEMENT_FACTORY = XrNewSceneComputeInfoMSFT.create(-1L); - - /** - * Creates a new {@code XrNewSceneComputeInfoMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrNewSceneComputeInfoMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrNewSceneComputeInfoMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrNewSceneComputeInfoMSFT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrNewSceneComputeInfoMSFT.nnext(address()); } - /** @return the value of the {@code requestedFeatureCount} field. */ - @NativeType("uint32_t") - public int requestedFeatureCount() { return XrNewSceneComputeInfoMSFT.nrequestedFeatureCount(address()); } - /** @return a {@link IntBuffer} view of the data pointed to by the {@code requestedFeatures} field. */ - @NativeType("XrSceneComputeFeatureMSFT const *") - public IntBuffer requestedFeatures() { return XrNewSceneComputeInfoMSFT.nrequestedFeatures(address()); } - /** @return the value of the {@code consistency} field. */ - @NativeType("XrSceneComputeConsistencyMSFT") - public int consistency() { return XrNewSceneComputeInfoMSFT.nconsistency(address()); } - /** @return a {@link XrSceneBoundsMSFT} view of the {@code bounds} field. */ - public XrSceneBoundsMSFT bounds() { return XrNewSceneComputeInfoMSFT.nbounds(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrNewSceneComputeInfoMSFT.ntype(address(), value); return this; } - /** Sets the {@link MSFTSceneUnderstanding#XR_TYPE_NEW_SCENE_COMPUTE_INFO_MSFT TYPE_NEW_SCENE_COMPUTE_INFO_MSFT} value to the {@code type} field. */ - public Buffer type$Default() { return type(MSFTSceneUnderstanding.XR_TYPE_NEW_SCENE_COMPUTE_INFO_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrNewSceneComputeInfoMSFT.nnext(address(), value); return this; } - /** Sets the address of the specified {@link IntBuffer} to the {@code requestedFeatures} field. */ - public Buffer requestedFeatures(@NativeType("XrSceneComputeFeatureMSFT const *") IntBuffer value) { XrNewSceneComputeInfoMSFT.nrequestedFeatures(address(), value); return this; } - /** Sets the specified value to the {@code consistency} field. */ - public Buffer consistency(@NativeType("XrSceneComputeConsistencyMSFT") int value) { XrNewSceneComputeInfoMSFT.nconsistency(address(), value); return this; } - /** Copies the specified {@link XrSceneBoundsMSFT} to the {@code bounds} field. */ - public Buffer bounds(XrSceneBoundsMSFT value) { XrNewSceneComputeInfoMSFT.nbounds(address(), value); return this; } - /** Passes the {@code bounds} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer bounds(java.util.function.Consumer consumer) { consumer.accept(bounds()); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrOffset2Df.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrOffset2Df.java deleted file mode 100644 index e01d3bce..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrOffset2Df.java +++ /dev/null @@ -1,271 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrOffset2Df {
- *     float x;
- *     float y;
- * }
- */ -public class XrOffset2Df extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - X, - Y; - - static { - Layout layout = __struct( - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - X = layout.offsetof(0); - Y = layout.offsetof(1); - } - - /** - * Creates a {@code XrOffset2Df} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrOffset2Df(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code x} field. */ - public float x() { return nx(address()); } - /** @return the value of the {@code y} field. */ - public float y() { return ny(address()); } - - /** Sets the specified value to the {@code x} field. */ - public XrOffset2Df x(float value) { nx(address(), value); return this; } - /** Sets the specified value to the {@code y} field. */ - public XrOffset2Df y(float value) { ny(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrOffset2Df set( - float x, - float y - ) { - x(x); - y(y); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrOffset2Df set(XrOffset2Df src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrOffset2Df} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrOffset2Df malloc() { - return wrap(XrOffset2Df.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrOffset2Df} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrOffset2Df calloc() { - return wrap(XrOffset2Df.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrOffset2Df} instance allocated with {@link BufferUtils}. */ - public static XrOffset2Df create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrOffset2Df.class, memAddress(container), container); - } - - /** Returns a new {@code XrOffset2Df} instance for the specified memory address. */ - public static XrOffset2Df create(long address) { - return wrap(XrOffset2Df.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrOffset2Df createSafe(long address) { - return address == NULL ? null : wrap(XrOffset2Df.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrOffset2Df.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrOffset2Df} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrOffset2Df malloc(MemoryStack stack) { - return wrap(XrOffset2Df.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrOffset2Df} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrOffset2Df calloc(MemoryStack stack) { - return wrap(XrOffset2Df.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #x}. */ - public static float nx(long struct) { return UNSAFE.getFloat(null, struct + XrOffset2Df.X); } - /** Unsafe version of {@link #y}. */ - public static float ny(long struct) { return UNSAFE.getFloat(null, struct + XrOffset2Df.Y); } - - /** Unsafe version of {@link #x(float) x}. */ - public static void nx(long struct, float value) { UNSAFE.putFloat(null, struct + XrOffset2Df.X, value); } - /** Unsafe version of {@link #y(float) y}. */ - public static void ny(long struct, float value) { UNSAFE.putFloat(null, struct + XrOffset2Df.Y, value); } - - // ----------------------------------- - - /** An array of {@link XrOffset2Df} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrOffset2Df ELEMENT_FACTORY = XrOffset2Df.create(-1L); - - /** - * Creates a new {@code XrOffset2Df.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrOffset2Df#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrOffset2Df getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code x} field. */ - public float x() { return XrOffset2Df.nx(address()); } - /** @return the value of the {@code y} field. */ - public float y() { return XrOffset2Df.ny(address()); } - - /** Sets the specified value to the {@code x} field. */ - public Buffer x(float value) { XrOffset2Df.nx(address(), value); return this; } - /** Sets the specified value to the {@code y} field. */ - public Buffer y(float value) { XrOffset2Df.ny(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrOffset2Di.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrOffset2Di.java deleted file mode 100644 index 05f7d416..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrOffset2Di.java +++ /dev/null @@ -1,275 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrOffset2Di {
- *     int32_t x;
- *     int32_t y;
- * }
- */ -public class XrOffset2Di extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - X, - Y; - - static { - Layout layout = __struct( - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - X = layout.offsetof(0); - Y = layout.offsetof(1); - } - - /** - * Creates a {@code XrOffset2Di} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrOffset2Di(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code x} field. */ - @NativeType("int32_t") - public int x() { return nx(address()); } - /** @return the value of the {@code y} field. */ - @NativeType("int32_t") - public int y() { return ny(address()); } - - /** Sets the specified value to the {@code x} field. */ - public XrOffset2Di x(@NativeType("int32_t") int value) { nx(address(), value); return this; } - /** Sets the specified value to the {@code y} field. */ - public XrOffset2Di y(@NativeType("int32_t") int value) { ny(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrOffset2Di set( - int x, - int y - ) { - x(x); - y(y); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrOffset2Di set(XrOffset2Di src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrOffset2Di} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrOffset2Di malloc() { - return wrap(XrOffset2Di.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrOffset2Di} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrOffset2Di calloc() { - return wrap(XrOffset2Di.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrOffset2Di} instance allocated with {@link BufferUtils}. */ - public static XrOffset2Di create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrOffset2Di.class, memAddress(container), container); - } - - /** Returns a new {@code XrOffset2Di} instance for the specified memory address. */ - public static XrOffset2Di create(long address) { - return wrap(XrOffset2Di.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrOffset2Di createSafe(long address) { - return address == NULL ? null : wrap(XrOffset2Di.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrOffset2Di.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrOffset2Di} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrOffset2Di malloc(MemoryStack stack) { - return wrap(XrOffset2Di.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrOffset2Di} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrOffset2Di calloc(MemoryStack stack) { - return wrap(XrOffset2Di.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #x}. */ - public static int nx(long struct) { return UNSAFE.getInt(null, struct + XrOffset2Di.X); } - /** Unsafe version of {@link #y}. */ - public static int ny(long struct) { return UNSAFE.getInt(null, struct + XrOffset2Di.Y); } - - /** Unsafe version of {@link #x(int) x}. */ - public static void nx(long struct, int value) { UNSAFE.putInt(null, struct + XrOffset2Di.X, value); } - /** Unsafe version of {@link #y(int) y}. */ - public static void ny(long struct, int value) { UNSAFE.putInt(null, struct + XrOffset2Di.Y, value); } - - // ----------------------------------- - - /** An array of {@link XrOffset2Di} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrOffset2Di ELEMENT_FACTORY = XrOffset2Di.create(-1L); - - /** - * Creates a new {@code XrOffset2Di.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrOffset2Di#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrOffset2Di getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code x} field. */ - @NativeType("int32_t") - public int x() { return XrOffset2Di.nx(address()); } - /** @return the value of the {@code y} field. */ - @NativeType("int32_t") - public int y() { return XrOffset2Di.ny(address()); } - - /** Sets the specified value to the {@code x} field. */ - public Buffer x(@NativeType("int32_t") int value) { XrOffset2Di.nx(address(), value); return this; } - /** Sets the specified value to the {@code y} field. */ - public Buffer y(@NativeType("int32_t") int value) { XrOffset2Di.ny(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrPassthroughColorMapMonoToMonoFB.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrPassthroughColorMapMonoToMonoFB.java deleted file mode 100644 index a1e53955..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrPassthroughColorMapMonoToMonoFB.java +++ /dev/null @@ -1,322 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.openxr.FBPassthrough.XR_PASSTHROUGH_COLOR_MAP_MONO_SIZE_FB; -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrPassthroughColorMapMonoToMonoFB {
- *     XrStructureType type;
- *     void const * next;
- *     uint8_t textureColorMap[XR_PASSTHROUGH_COLOR_MAP_MONO_SIZE_FB];
- * }
- */ -public class XrPassthroughColorMapMonoToMonoFB extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - TEXTURECOLORMAP; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __array(1, XR_PASSTHROUGH_COLOR_MAP_MONO_SIZE_FB) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - TEXTURECOLORMAP = layout.offsetof(2); - } - - /** - * Creates a {@code XrPassthroughColorMapMonoToMonoFB} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrPassthroughColorMapMonoToMonoFB(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return a {@link ByteBuffer} view of the {@code textureColorMap} field. */ - @NativeType("uint8_t[XR_PASSTHROUGH_COLOR_MAP_MONO_SIZE_FB]") - public ByteBuffer textureColorMap() { return ntextureColorMap(address()); } - /** @return the value at the specified index of the {@code textureColorMap} field. */ - @NativeType("uint8_t") - public byte textureColorMap(int index) { return ntextureColorMap(address(), index); } - - /** Sets the specified value to the {@code type} field. */ - public XrPassthroughColorMapMonoToMonoFB type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link FBPassthrough#XR_TYPE_PASSTHROUGH_COLOR_MAP_MONO_TO_MONO_FB TYPE_PASSTHROUGH_COLOR_MAP_MONO_TO_MONO_FB} value to the {@code type} field. */ - public XrPassthroughColorMapMonoToMonoFB type$Default() { return type(FBPassthrough.XR_TYPE_PASSTHROUGH_COLOR_MAP_MONO_TO_MONO_FB); } - /** Sets the specified value to the {@code next} field. */ - public XrPassthroughColorMapMonoToMonoFB next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Copies the specified {@link ByteBuffer} to the {@code textureColorMap} field. */ - public XrPassthroughColorMapMonoToMonoFB textureColorMap(@NativeType("uint8_t[XR_PASSTHROUGH_COLOR_MAP_MONO_SIZE_FB]") ByteBuffer value) { ntextureColorMap(address(), value); return this; } - /** Sets the specified value at the specified index of the {@code textureColorMap} field. */ - public XrPassthroughColorMapMonoToMonoFB textureColorMap(int index, @NativeType("uint8_t") byte value) { ntextureColorMap(address(), index, value); return this; } - - /** Initializes this struct with the specified values. */ - public XrPassthroughColorMapMonoToMonoFB set( - int type, - long next, - ByteBuffer textureColorMap - ) { - type(type); - next(next); - textureColorMap(textureColorMap); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrPassthroughColorMapMonoToMonoFB set(XrPassthroughColorMapMonoToMonoFB src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrPassthroughColorMapMonoToMonoFB} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrPassthroughColorMapMonoToMonoFB malloc() { - return wrap(XrPassthroughColorMapMonoToMonoFB.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrPassthroughColorMapMonoToMonoFB} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrPassthroughColorMapMonoToMonoFB calloc() { - return wrap(XrPassthroughColorMapMonoToMonoFB.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrPassthroughColorMapMonoToMonoFB} instance allocated with {@link BufferUtils}. */ - public static XrPassthroughColorMapMonoToMonoFB create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrPassthroughColorMapMonoToMonoFB.class, memAddress(container), container); - } - - /** Returns a new {@code XrPassthroughColorMapMonoToMonoFB} instance for the specified memory address. */ - public static XrPassthroughColorMapMonoToMonoFB create(long address) { - return wrap(XrPassthroughColorMapMonoToMonoFB.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrPassthroughColorMapMonoToMonoFB createSafe(long address) { - return address == NULL ? null : wrap(XrPassthroughColorMapMonoToMonoFB.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrPassthroughColorMapMonoToMonoFB.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrPassthroughColorMapMonoToMonoFB} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrPassthroughColorMapMonoToMonoFB malloc(MemoryStack stack) { - return wrap(XrPassthroughColorMapMonoToMonoFB.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrPassthroughColorMapMonoToMonoFB} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrPassthroughColorMapMonoToMonoFB calloc(MemoryStack stack) { - return wrap(XrPassthroughColorMapMonoToMonoFB.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrPassthroughColorMapMonoToMonoFB.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrPassthroughColorMapMonoToMonoFB.NEXT); } - /** Unsafe version of {@link #textureColorMap}. */ - public static ByteBuffer ntextureColorMap(long struct) { return memByteBuffer(struct + XrPassthroughColorMapMonoToMonoFB.TEXTURECOLORMAP, XR_PASSTHROUGH_COLOR_MAP_MONO_SIZE_FB); } - /** Unsafe version of {@link #textureColorMap(int) textureColorMap}. */ - public static byte ntextureColorMap(long struct, int index) { - return UNSAFE.getByte(null, struct + XrPassthroughColorMapMonoToMonoFB.TEXTURECOLORMAP + check(index, XR_PASSTHROUGH_COLOR_MAP_MONO_SIZE_FB) * 1); - } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrPassthroughColorMapMonoToMonoFB.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrPassthroughColorMapMonoToMonoFB.NEXT, value); } - /** Unsafe version of {@link #textureColorMap(ByteBuffer) textureColorMap}. */ - public static void ntextureColorMap(long struct, ByteBuffer value) { - if (CHECKS) { checkGT(value, XR_PASSTHROUGH_COLOR_MAP_MONO_SIZE_FB); } - memCopy(memAddress(value), struct + XrPassthroughColorMapMonoToMonoFB.TEXTURECOLORMAP, value.remaining() * 1); - } - /** Unsafe version of {@link #textureColorMap(int, byte) textureColorMap}. */ - public static void ntextureColorMap(long struct, int index, byte value) { - UNSAFE.putByte(null, struct + XrPassthroughColorMapMonoToMonoFB.TEXTURECOLORMAP + check(index, XR_PASSTHROUGH_COLOR_MAP_MONO_SIZE_FB) * 1, value); - } - - // ----------------------------------- - - /** An array of {@link XrPassthroughColorMapMonoToMonoFB} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrPassthroughColorMapMonoToMonoFB ELEMENT_FACTORY = XrPassthroughColorMapMonoToMonoFB.create(-1L); - - /** - * Creates a new {@code XrPassthroughColorMapMonoToMonoFB.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrPassthroughColorMapMonoToMonoFB#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrPassthroughColorMapMonoToMonoFB getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrPassthroughColorMapMonoToMonoFB.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrPassthroughColorMapMonoToMonoFB.nnext(address()); } - /** @return a {@link ByteBuffer} view of the {@code textureColorMap} field. */ - @NativeType("uint8_t[XR_PASSTHROUGH_COLOR_MAP_MONO_SIZE_FB]") - public ByteBuffer textureColorMap() { return XrPassthroughColorMapMonoToMonoFB.ntextureColorMap(address()); } - /** @return the value at the specified index of the {@code textureColorMap} field. */ - @NativeType("uint8_t") - public byte textureColorMap(int index) { return XrPassthroughColorMapMonoToMonoFB.ntextureColorMap(address(), index); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrPassthroughColorMapMonoToMonoFB.ntype(address(), value); return this; } - /** Sets the {@link FBPassthrough#XR_TYPE_PASSTHROUGH_COLOR_MAP_MONO_TO_MONO_FB TYPE_PASSTHROUGH_COLOR_MAP_MONO_TO_MONO_FB} value to the {@code type} field. */ - public Buffer type$Default() { return type(FBPassthrough.XR_TYPE_PASSTHROUGH_COLOR_MAP_MONO_TO_MONO_FB); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrPassthroughColorMapMonoToMonoFB.nnext(address(), value); return this; } - /** Copies the specified {@link ByteBuffer} to the {@code textureColorMap} field. */ - public Buffer textureColorMap(@NativeType("uint8_t[XR_PASSTHROUGH_COLOR_MAP_MONO_SIZE_FB]") ByteBuffer value) { XrPassthroughColorMapMonoToMonoFB.ntextureColorMap(address(), value); return this; } - /** Sets the specified value at the specified index of the {@code textureColorMap} field. */ - public Buffer textureColorMap(int index, @NativeType("uint8_t") byte value) { XrPassthroughColorMapMonoToMonoFB.ntextureColorMap(address(), index, value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrPassthroughColorMapMonoToRgbaFB.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrPassthroughColorMapMonoToRgbaFB.java deleted file mode 100644 index b9fddceb..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrPassthroughColorMapMonoToRgbaFB.java +++ /dev/null @@ -1,328 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.openxr.FBPassthrough.XR_PASSTHROUGH_COLOR_MAP_MONO_SIZE_FB; -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrPassthroughColorMapMonoToRgbaFB {
- *     XrStructureType type;
- *     void const * next;
- *     {@link XrColor4f XrColor4f} textureColorMap[XR_PASSTHROUGH_COLOR_MAP_MONO_SIZE_FB];
- * }
- */ -public class XrPassthroughColorMapMonoToRgbaFB extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - TEXTURECOLORMAP; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __array(XrColor4f.SIZEOF, XrColor4f.ALIGNOF, XR_PASSTHROUGH_COLOR_MAP_MONO_SIZE_FB) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - TEXTURECOLORMAP = layout.offsetof(2); - } - - /** - * Creates a {@code XrPassthroughColorMapMonoToRgbaFB} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrPassthroughColorMapMonoToRgbaFB(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return a {@link XrColor4f}.Buffer view of the {@code textureColorMap} field. */ - @NativeType("XrColor4f[XR_PASSTHROUGH_COLOR_MAP_MONO_SIZE_FB]") - public XrColor4f.Buffer textureColorMap() { return ntextureColorMap(address()); } - /** @return a {@link XrColor4f} view of the struct at the specified index of the {@code textureColorMap} field. */ - public XrColor4f textureColorMap(int index) { return ntextureColorMap(address(), index); } - - /** Sets the specified value to the {@code type} field. */ - public XrPassthroughColorMapMonoToRgbaFB type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link FBPassthrough#XR_TYPE_PASSTHROUGH_COLOR_MAP_MONO_TO_RGBA_FB TYPE_PASSTHROUGH_COLOR_MAP_MONO_TO_RGBA_FB} value to the {@code type} field. */ - public XrPassthroughColorMapMonoToRgbaFB type$Default() { return type(FBPassthrough.XR_TYPE_PASSTHROUGH_COLOR_MAP_MONO_TO_RGBA_FB); } - /** Sets the specified value to the {@code next} field. */ - public XrPassthroughColorMapMonoToRgbaFB next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Copies the specified {@link XrColor4f.Buffer} to the {@code textureColorMap} field. */ - public XrPassthroughColorMapMonoToRgbaFB textureColorMap(@NativeType("XrColor4f[XR_PASSTHROUGH_COLOR_MAP_MONO_SIZE_FB]") XrColor4f.Buffer value) { ntextureColorMap(address(), value); return this; } - /** Copies the specified {@link XrColor4f} at the specified index of the {@code textureColorMap} field. */ - public XrPassthroughColorMapMonoToRgbaFB textureColorMap(int index, XrColor4f value) { ntextureColorMap(address(), index, value); return this; } - /** Passes the {@code textureColorMap} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrPassthroughColorMapMonoToRgbaFB textureColorMap(java.util.function.Consumer consumer) { consumer.accept(textureColorMap()); return this; } - /** Passes the element at {@code index} of the {@code textureColorMap} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrPassthroughColorMapMonoToRgbaFB textureColorMap(int index, java.util.function.Consumer consumer) { consumer.accept(textureColorMap(index)); return this; } - - /** Initializes this struct with the specified values. */ - public XrPassthroughColorMapMonoToRgbaFB set( - int type, - long next, - XrColor4f.Buffer textureColorMap - ) { - type(type); - next(next); - textureColorMap(textureColorMap); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrPassthroughColorMapMonoToRgbaFB set(XrPassthroughColorMapMonoToRgbaFB src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrPassthroughColorMapMonoToRgbaFB} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrPassthroughColorMapMonoToRgbaFB malloc() { - return wrap(XrPassthroughColorMapMonoToRgbaFB.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrPassthroughColorMapMonoToRgbaFB} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrPassthroughColorMapMonoToRgbaFB calloc() { - return wrap(XrPassthroughColorMapMonoToRgbaFB.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrPassthroughColorMapMonoToRgbaFB} instance allocated with {@link BufferUtils}. */ - public static XrPassthroughColorMapMonoToRgbaFB create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrPassthroughColorMapMonoToRgbaFB.class, memAddress(container), container); - } - - /** Returns a new {@code XrPassthroughColorMapMonoToRgbaFB} instance for the specified memory address. */ - public static XrPassthroughColorMapMonoToRgbaFB create(long address) { - return wrap(XrPassthroughColorMapMonoToRgbaFB.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrPassthroughColorMapMonoToRgbaFB createSafe(long address) { - return address == NULL ? null : wrap(XrPassthroughColorMapMonoToRgbaFB.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrPassthroughColorMapMonoToRgbaFB.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrPassthroughColorMapMonoToRgbaFB} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrPassthroughColorMapMonoToRgbaFB malloc(MemoryStack stack) { - return wrap(XrPassthroughColorMapMonoToRgbaFB.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrPassthroughColorMapMonoToRgbaFB} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrPassthroughColorMapMonoToRgbaFB calloc(MemoryStack stack) { - return wrap(XrPassthroughColorMapMonoToRgbaFB.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrPassthroughColorMapMonoToRgbaFB.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrPassthroughColorMapMonoToRgbaFB.NEXT); } - /** Unsafe version of {@link #textureColorMap}. */ - public static XrColor4f.Buffer ntextureColorMap(long struct) { return XrColor4f.create(struct + XrPassthroughColorMapMonoToRgbaFB.TEXTURECOLORMAP, XR_PASSTHROUGH_COLOR_MAP_MONO_SIZE_FB); } - /** Unsafe version of {@link #textureColorMap(int) textureColorMap}. */ - public static XrColor4f ntextureColorMap(long struct, int index) { - return XrColor4f.create(struct + XrPassthroughColorMapMonoToRgbaFB.TEXTURECOLORMAP + check(index, XR_PASSTHROUGH_COLOR_MAP_MONO_SIZE_FB) * XrColor4f.SIZEOF); - } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrPassthroughColorMapMonoToRgbaFB.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrPassthroughColorMapMonoToRgbaFB.NEXT, value); } - /** Unsafe version of {@link #textureColorMap(XrColor4f.Buffer) textureColorMap}. */ - public static void ntextureColorMap(long struct, XrColor4f.Buffer value) { - if (CHECKS) { checkGT(value, XR_PASSTHROUGH_COLOR_MAP_MONO_SIZE_FB); } - memCopy(value.address(), struct + XrPassthroughColorMapMonoToRgbaFB.TEXTURECOLORMAP, value.remaining() * XrColor4f.SIZEOF); - } - /** Unsafe version of {@link #textureColorMap(int, XrColor4f) textureColorMap}. */ - public static void ntextureColorMap(long struct, int index, XrColor4f value) { - memCopy(value.address(), struct + XrPassthroughColorMapMonoToRgbaFB.TEXTURECOLORMAP + check(index, XR_PASSTHROUGH_COLOR_MAP_MONO_SIZE_FB) * XrColor4f.SIZEOF, XrColor4f.SIZEOF); - } - - // ----------------------------------- - - /** An array of {@link XrPassthroughColorMapMonoToRgbaFB} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrPassthroughColorMapMonoToRgbaFB ELEMENT_FACTORY = XrPassthroughColorMapMonoToRgbaFB.create(-1L); - - /** - * Creates a new {@code XrPassthroughColorMapMonoToRgbaFB.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrPassthroughColorMapMonoToRgbaFB#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrPassthroughColorMapMonoToRgbaFB getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrPassthroughColorMapMonoToRgbaFB.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrPassthroughColorMapMonoToRgbaFB.nnext(address()); } - /** @return a {@link XrColor4f}.Buffer view of the {@code textureColorMap} field. */ - @NativeType("XrColor4f[XR_PASSTHROUGH_COLOR_MAP_MONO_SIZE_FB]") - public XrColor4f.Buffer textureColorMap() { return XrPassthroughColorMapMonoToRgbaFB.ntextureColorMap(address()); } - /** @return a {@link XrColor4f} view of the struct at the specified index of the {@code textureColorMap} field. */ - public XrColor4f textureColorMap(int index) { return XrPassthroughColorMapMonoToRgbaFB.ntextureColorMap(address(), index); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrPassthroughColorMapMonoToRgbaFB.ntype(address(), value); return this; } - /** Sets the {@link FBPassthrough#XR_TYPE_PASSTHROUGH_COLOR_MAP_MONO_TO_RGBA_FB TYPE_PASSTHROUGH_COLOR_MAP_MONO_TO_RGBA_FB} value to the {@code type} field. */ - public Buffer type$Default() { return type(FBPassthrough.XR_TYPE_PASSTHROUGH_COLOR_MAP_MONO_TO_RGBA_FB); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrPassthroughColorMapMonoToRgbaFB.nnext(address(), value); return this; } - /** Copies the specified {@link XrColor4f.Buffer} to the {@code textureColorMap} field. */ - public Buffer textureColorMap(@NativeType("XrColor4f[XR_PASSTHROUGH_COLOR_MAP_MONO_SIZE_FB]") XrColor4f.Buffer value) { XrPassthroughColorMapMonoToRgbaFB.ntextureColorMap(address(), value); return this; } - /** Copies the specified {@link XrColor4f} at the specified index of the {@code textureColorMap} field. */ - public Buffer textureColorMap(int index, XrColor4f value) { XrPassthroughColorMapMonoToRgbaFB.ntextureColorMap(address(), index, value); return this; } - /** Passes the {@code textureColorMap} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer textureColorMap(java.util.function.Consumer consumer) { consumer.accept(textureColorMap()); return this; } - /** Passes the element at {@code index} of the {@code textureColorMap} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer textureColorMap(int index, java.util.function.Consumer consumer) { consumer.accept(textureColorMap(index)); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrPassthroughCreateInfoFB.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrPassthroughCreateInfoFB.java deleted file mode 100644 index a707d7df..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrPassthroughCreateInfoFB.java +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrPassthroughCreateInfoFB {
- *     XrStructureType type;
- *     void const * next;
- *     XrPassthroughFlagsFB flags;
- * }
- */ -public class XrPassthroughCreateInfoFB extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - FLAGS; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(8) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - FLAGS = layout.offsetof(2); - } - - /** - * Creates a {@code XrPassthroughCreateInfoFB} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrPassthroughCreateInfoFB(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code flags} field. */ - @NativeType("XrPassthroughFlagsFB") - public long flags() { return nflags(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrPassthroughCreateInfoFB type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link FBPassthrough#XR_TYPE_PASSTHROUGH_CREATE_INFO_FB TYPE_PASSTHROUGH_CREATE_INFO_FB} value to the {@code type} field. */ - public XrPassthroughCreateInfoFB type$Default() { return type(FBPassthrough.XR_TYPE_PASSTHROUGH_CREATE_INFO_FB); } - /** Sets the specified value to the {@code next} field. */ - public XrPassthroughCreateInfoFB next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code flags} field. */ - public XrPassthroughCreateInfoFB flags(@NativeType("XrPassthroughFlagsFB") long value) { nflags(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrPassthroughCreateInfoFB set( - int type, - long next, - long flags - ) { - type(type); - next(next); - flags(flags); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrPassthroughCreateInfoFB set(XrPassthroughCreateInfoFB src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrPassthroughCreateInfoFB} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrPassthroughCreateInfoFB malloc() { - return wrap(XrPassthroughCreateInfoFB.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrPassthroughCreateInfoFB} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrPassthroughCreateInfoFB calloc() { - return wrap(XrPassthroughCreateInfoFB.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrPassthroughCreateInfoFB} instance allocated with {@link BufferUtils}. */ - public static XrPassthroughCreateInfoFB create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrPassthroughCreateInfoFB.class, memAddress(container), container); - } - - /** Returns a new {@code XrPassthroughCreateInfoFB} instance for the specified memory address. */ - public static XrPassthroughCreateInfoFB create(long address) { - return wrap(XrPassthroughCreateInfoFB.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrPassthroughCreateInfoFB createSafe(long address) { - return address == NULL ? null : wrap(XrPassthroughCreateInfoFB.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrPassthroughCreateInfoFB.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrPassthroughCreateInfoFB} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrPassthroughCreateInfoFB malloc(MemoryStack stack) { - return wrap(XrPassthroughCreateInfoFB.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrPassthroughCreateInfoFB} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrPassthroughCreateInfoFB calloc(MemoryStack stack) { - return wrap(XrPassthroughCreateInfoFB.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrPassthroughCreateInfoFB.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrPassthroughCreateInfoFB.NEXT); } - /** Unsafe version of {@link #flags}. */ - public static long nflags(long struct) { return UNSAFE.getLong(null, struct + XrPassthroughCreateInfoFB.FLAGS); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrPassthroughCreateInfoFB.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrPassthroughCreateInfoFB.NEXT, value); } - /** Unsafe version of {@link #flags(long) flags}. */ - public static void nflags(long struct, long value) { UNSAFE.putLong(null, struct + XrPassthroughCreateInfoFB.FLAGS, value); } - - // ----------------------------------- - - /** An array of {@link XrPassthroughCreateInfoFB} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrPassthroughCreateInfoFB ELEMENT_FACTORY = XrPassthroughCreateInfoFB.create(-1L); - - /** - * Creates a new {@code XrPassthroughCreateInfoFB.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrPassthroughCreateInfoFB#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrPassthroughCreateInfoFB getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrPassthroughCreateInfoFB.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrPassthroughCreateInfoFB.nnext(address()); } - /** @return the value of the {@code flags} field. */ - @NativeType("XrPassthroughFlagsFB") - public long flags() { return XrPassthroughCreateInfoFB.nflags(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrPassthroughCreateInfoFB.ntype(address(), value); return this; } - /** Sets the {@link FBPassthrough#XR_TYPE_PASSTHROUGH_CREATE_INFO_FB TYPE_PASSTHROUGH_CREATE_INFO_FB} value to the {@code type} field. */ - public Buffer type$Default() { return type(FBPassthrough.XR_TYPE_PASSTHROUGH_CREATE_INFO_FB); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrPassthroughCreateInfoFB.nnext(address(), value); return this; } - /** Sets the specified value to the {@code flags} field. */ - public Buffer flags(@NativeType("XrPassthroughFlagsFB") long value) { XrPassthroughCreateInfoFB.nflags(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrPassthroughFB.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrPassthroughFB.java deleted file mode 100644 index 4598963d..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrPassthroughFB.java +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.openxr; - -public class XrPassthroughFB extends DispatchableHandle { - public XrPassthroughFB(long handle, DispatchableHandle session) { - super(handle, session.getCapabilities()); - } - - public XrPassthroughFB(long handle, XRCapabilities capabilities) { - super(handle, capabilities); - } -} diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrPassthroughLayerCreateInfoFB.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrPassthroughLayerCreateInfoFB.java deleted file mode 100644 index 3b2c87c8..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrPassthroughLayerCreateInfoFB.java +++ /dev/null @@ -1,361 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrPassthroughLayerCreateInfoFB {
- *     XrStructureType type;
- *     void const * next;
- *     XrPassthroughFB passthrough;
- *     XrPassthroughFlagsFB flags;
- *     XrPassthroughLayerPurposeFB purpose;
- * }
- */ -public class XrPassthroughLayerCreateInfoFB extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - PASSTHROUGH, - FLAGS, - PURPOSE; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(8), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - PASSTHROUGH = layout.offsetof(2); - FLAGS = layout.offsetof(3); - PURPOSE = layout.offsetof(4); - } - - /** - * Creates a {@code XrPassthroughLayerCreateInfoFB} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrPassthroughLayerCreateInfoFB(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code passthrough} field. */ - @NativeType("XrPassthroughFB") - public long passthrough() { return npassthrough(address()); } - /** @return the value of the {@code flags} field. */ - @NativeType("XrPassthroughFlagsFB") - public long flags() { return nflags(address()); } - /** @return the value of the {@code purpose} field. */ - @NativeType("XrPassthroughLayerPurposeFB") - public int purpose() { return npurpose(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrPassthroughLayerCreateInfoFB type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link FBPassthrough#XR_TYPE_PASSTHROUGH_LAYER_CREATE_INFO_FB TYPE_PASSTHROUGH_LAYER_CREATE_INFO_FB} value to the {@code type} field. */ - public XrPassthroughLayerCreateInfoFB type$Default() { return type(FBPassthrough.XR_TYPE_PASSTHROUGH_LAYER_CREATE_INFO_FB); } - /** Sets the specified value to the {@code next} field. */ - public XrPassthroughLayerCreateInfoFB next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code passthrough} field. */ - public XrPassthroughLayerCreateInfoFB passthrough(XrPassthroughFB value) { npassthrough(address(), value); return this; } - /** Sets the specified value to the {@code flags} field. */ - public XrPassthroughLayerCreateInfoFB flags(@NativeType("XrPassthroughFlagsFB") long value) { nflags(address(), value); return this; } - /** Sets the specified value to the {@code purpose} field. */ - public XrPassthroughLayerCreateInfoFB purpose(@NativeType("XrPassthroughLayerPurposeFB") int value) { npurpose(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrPassthroughLayerCreateInfoFB set( - int type, - long next, - XrPassthroughFB passthrough, - long flags, - int purpose - ) { - type(type); - next(next); - passthrough(passthrough); - flags(flags); - purpose(purpose); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrPassthroughLayerCreateInfoFB set(XrPassthroughLayerCreateInfoFB src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrPassthroughLayerCreateInfoFB} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrPassthroughLayerCreateInfoFB malloc() { - return wrap(XrPassthroughLayerCreateInfoFB.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrPassthroughLayerCreateInfoFB} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrPassthroughLayerCreateInfoFB calloc() { - return wrap(XrPassthroughLayerCreateInfoFB.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrPassthroughLayerCreateInfoFB} instance allocated with {@link BufferUtils}. */ - public static XrPassthroughLayerCreateInfoFB create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrPassthroughLayerCreateInfoFB.class, memAddress(container), container); - } - - /** Returns a new {@code XrPassthroughLayerCreateInfoFB} instance for the specified memory address. */ - public static XrPassthroughLayerCreateInfoFB create(long address) { - return wrap(XrPassthroughLayerCreateInfoFB.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrPassthroughLayerCreateInfoFB createSafe(long address) { - return address == NULL ? null : wrap(XrPassthroughLayerCreateInfoFB.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrPassthroughLayerCreateInfoFB.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrPassthroughLayerCreateInfoFB} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrPassthroughLayerCreateInfoFB malloc(MemoryStack stack) { - return wrap(XrPassthroughLayerCreateInfoFB.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrPassthroughLayerCreateInfoFB} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrPassthroughLayerCreateInfoFB calloc(MemoryStack stack) { - return wrap(XrPassthroughLayerCreateInfoFB.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrPassthroughLayerCreateInfoFB.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrPassthroughLayerCreateInfoFB.NEXT); } - /** Unsafe version of {@link #passthrough}. */ - public static long npassthrough(long struct) { return memGetAddress(struct + XrPassthroughLayerCreateInfoFB.PASSTHROUGH); } - /** Unsafe version of {@link #flags}. */ - public static long nflags(long struct) { return UNSAFE.getLong(null, struct + XrPassthroughLayerCreateInfoFB.FLAGS); } - /** Unsafe version of {@link #purpose}. */ - public static int npurpose(long struct) { return UNSAFE.getInt(null, struct + XrPassthroughLayerCreateInfoFB.PURPOSE); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrPassthroughLayerCreateInfoFB.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrPassthroughLayerCreateInfoFB.NEXT, value); } - /** Unsafe version of {@link #passthrough(XrPassthroughFB) passthrough}. */ - public static void npassthrough(long struct, XrPassthroughFB value) { memPutAddress(struct + XrPassthroughLayerCreateInfoFB.PASSTHROUGH, value.address()); } - /** Unsafe version of {@link #flags(long) flags}. */ - public static void nflags(long struct, long value) { UNSAFE.putLong(null, struct + XrPassthroughLayerCreateInfoFB.FLAGS, value); } - /** Unsafe version of {@link #purpose(int) purpose}. */ - public static void npurpose(long struct, int value) { UNSAFE.putInt(null, struct + XrPassthroughLayerCreateInfoFB.PURPOSE, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XrPassthroughLayerCreateInfoFB.PASSTHROUGH)); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrPassthroughLayerCreateInfoFB} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrPassthroughLayerCreateInfoFB ELEMENT_FACTORY = XrPassthroughLayerCreateInfoFB.create(-1L); - - /** - * Creates a new {@code XrPassthroughLayerCreateInfoFB.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrPassthroughLayerCreateInfoFB#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrPassthroughLayerCreateInfoFB getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrPassthroughLayerCreateInfoFB.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrPassthroughLayerCreateInfoFB.nnext(address()); } - /** @return the value of the {@code passthrough} field. */ - @NativeType("XrPassthroughFB") - public long passthrough() { return XrPassthroughLayerCreateInfoFB.npassthrough(address()); } - /** @return the value of the {@code flags} field. */ - @NativeType("XrPassthroughFlagsFB") - public long flags() { return XrPassthroughLayerCreateInfoFB.nflags(address()); } - /** @return the value of the {@code purpose} field. */ - @NativeType("XrPassthroughLayerPurposeFB") - public int purpose() { return XrPassthroughLayerCreateInfoFB.npurpose(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrPassthroughLayerCreateInfoFB.ntype(address(), value); return this; } - /** Sets the {@link FBPassthrough#XR_TYPE_PASSTHROUGH_LAYER_CREATE_INFO_FB TYPE_PASSTHROUGH_LAYER_CREATE_INFO_FB} value to the {@code type} field. */ - public Buffer type$Default() { return type(FBPassthrough.XR_TYPE_PASSTHROUGH_LAYER_CREATE_INFO_FB); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrPassthroughLayerCreateInfoFB.nnext(address(), value); return this; } - /** Sets the specified value to the {@code passthrough} field. */ - public Buffer passthrough(XrPassthroughFB value) { XrPassthroughLayerCreateInfoFB.npassthrough(address(), value); return this; } - /** Sets the specified value to the {@code flags} field. */ - public Buffer flags(@NativeType("XrPassthroughFlagsFB") long value) { XrPassthroughLayerCreateInfoFB.nflags(address(), value); return this; } - /** Sets the specified value to the {@code purpose} field. */ - public Buffer purpose(@NativeType("XrPassthroughLayerPurposeFB") int value) { XrPassthroughLayerCreateInfoFB.npurpose(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrPassthroughLayerFB.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrPassthroughLayerFB.java deleted file mode 100644 index 8b36b46d..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrPassthroughLayerFB.java +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.openxr; - -public class XrPassthroughLayerFB extends DispatchableHandle { - public XrPassthroughLayerFB(long handle, DispatchableHandle session) { - super(handle, session.getCapabilities()); - } - - public XrPassthroughLayerFB(long handle, XRCapabilities capabilities) { - super(handle, capabilities); - } -} diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrPassthroughStyleFB.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrPassthroughStyleFB.java deleted file mode 100644 index bd4ebb19..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrPassthroughStyleFB.java +++ /dev/null @@ -1,319 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrPassthroughStyleFB {
- *     XrStructureType type;
- *     void const * next;
- *     float textureOpacityFactor;
- *     {@link XrColor4f XrColor4f} edgeColor;
- * }
- */ -public class XrPassthroughStyleFB extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - TEXTUREOPACITYFACTOR, - EDGECOLOR; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(XrColor4f.SIZEOF, XrColor4f.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - TEXTUREOPACITYFACTOR = layout.offsetof(2); - EDGECOLOR = layout.offsetof(3); - } - - /** - * Creates a {@code XrPassthroughStyleFB} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrPassthroughStyleFB(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code textureOpacityFactor} field. */ - public float textureOpacityFactor() { return ntextureOpacityFactor(address()); } - /** @return a {@link XrColor4f} view of the {@code edgeColor} field. */ - public XrColor4f edgeColor() { return nedgeColor(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrPassthroughStyleFB type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link FBPassthrough#XR_TYPE_PASSTHROUGH_STYLE_FB TYPE_PASSTHROUGH_STYLE_FB} value to the {@code type} field. */ - public XrPassthroughStyleFB type$Default() { return type(FBPassthrough.XR_TYPE_PASSTHROUGH_STYLE_FB); } - /** Sets the specified value to the {@code next} field. */ - public XrPassthroughStyleFB next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code textureOpacityFactor} field. */ - public XrPassthroughStyleFB textureOpacityFactor(float value) { ntextureOpacityFactor(address(), value); return this; } - /** Copies the specified {@link XrColor4f} to the {@code edgeColor} field. */ - public XrPassthroughStyleFB edgeColor(XrColor4f value) { nedgeColor(address(), value); return this; } - /** Passes the {@code edgeColor} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrPassthroughStyleFB edgeColor(java.util.function.Consumer consumer) { consumer.accept(edgeColor()); return this; } - - /** Initializes this struct with the specified values. */ - public XrPassthroughStyleFB set( - int type, - long next, - float textureOpacityFactor, - XrColor4f edgeColor - ) { - type(type); - next(next); - textureOpacityFactor(textureOpacityFactor); - edgeColor(edgeColor); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrPassthroughStyleFB set(XrPassthroughStyleFB src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrPassthroughStyleFB} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrPassthroughStyleFB malloc() { - return wrap(XrPassthroughStyleFB.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrPassthroughStyleFB} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrPassthroughStyleFB calloc() { - return wrap(XrPassthroughStyleFB.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrPassthroughStyleFB} instance allocated with {@link BufferUtils}. */ - public static XrPassthroughStyleFB create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrPassthroughStyleFB.class, memAddress(container), container); - } - - /** Returns a new {@code XrPassthroughStyleFB} instance for the specified memory address. */ - public static XrPassthroughStyleFB create(long address) { - return wrap(XrPassthroughStyleFB.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrPassthroughStyleFB createSafe(long address) { - return address == NULL ? null : wrap(XrPassthroughStyleFB.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrPassthroughStyleFB.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrPassthroughStyleFB} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrPassthroughStyleFB malloc(MemoryStack stack) { - return wrap(XrPassthroughStyleFB.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrPassthroughStyleFB} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrPassthroughStyleFB calloc(MemoryStack stack) { - return wrap(XrPassthroughStyleFB.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrPassthroughStyleFB.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrPassthroughStyleFB.NEXT); } - /** Unsafe version of {@link #textureOpacityFactor}. */ - public static float ntextureOpacityFactor(long struct) { return UNSAFE.getFloat(null, struct + XrPassthroughStyleFB.TEXTUREOPACITYFACTOR); } - /** Unsafe version of {@link #edgeColor}. */ - public static XrColor4f nedgeColor(long struct) { return XrColor4f.create(struct + XrPassthroughStyleFB.EDGECOLOR); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrPassthroughStyleFB.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrPassthroughStyleFB.NEXT, value); } - /** Unsafe version of {@link #textureOpacityFactor(float) textureOpacityFactor}. */ - public static void ntextureOpacityFactor(long struct, float value) { UNSAFE.putFloat(null, struct + XrPassthroughStyleFB.TEXTUREOPACITYFACTOR, value); } - /** Unsafe version of {@link #edgeColor(XrColor4f) edgeColor}. */ - public static void nedgeColor(long struct, XrColor4f value) { memCopy(value.address(), struct + XrPassthroughStyleFB.EDGECOLOR, XrColor4f.SIZEOF); } - - // ----------------------------------- - - /** An array of {@link XrPassthroughStyleFB} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrPassthroughStyleFB ELEMENT_FACTORY = XrPassthroughStyleFB.create(-1L); - - /** - * Creates a new {@code XrPassthroughStyleFB.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrPassthroughStyleFB#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrPassthroughStyleFB getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrPassthroughStyleFB.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrPassthroughStyleFB.nnext(address()); } - /** @return the value of the {@code textureOpacityFactor} field. */ - public float textureOpacityFactor() { return XrPassthroughStyleFB.ntextureOpacityFactor(address()); } - /** @return a {@link XrColor4f} view of the {@code edgeColor} field. */ - public XrColor4f edgeColor() { return XrPassthroughStyleFB.nedgeColor(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrPassthroughStyleFB.ntype(address(), value); return this; } - /** Sets the {@link FBPassthrough#XR_TYPE_PASSTHROUGH_STYLE_FB TYPE_PASSTHROUGH_STYLE_FB} value to the {@code type} field. */ - public Buffer type$Default() { return type(FBPassthrough.XR_TYPE_PASSTHROUGH_STYLE_FB); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrPassthroughStyleFB.nnext(address(), value); return this; } - /** Sets the specified value to the {@code textureOpacityFactor} field. */ - public Buffer textureOpacityFactor(float value) { XrPassthroughStyleFB.ntextureOpacityFactor(address(), value); return this; } - /** Copies the specified {@link XrColor4f} to the {@code edgeColor} field. */ - public Buffer edgeColor(XrColor4f value) { XrPassthroughStyleFB.nedgeColor(address(), value); return this; } - /** Passes the {@code edgeColor} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer edgeColor(java.util.function.Consumer consumer) { consumer.accept(edgeColor()); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrPosef.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrPosef.java deleted file mode 100644 index 73a2de00..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrPosef.java +++ /dev/null @@ -1,279 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrPosef {
- *     {@link XrQuaternionf XrQuaternionf} orientation;
- *     {@link XrVector3f XrVector3f} position;
- * }
- */ -public class XrPosef extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - ORIENTATION, - POSITION; - - static { - Layout layout = __struct( - __member(XrQuaternionf.SIZEOF, XrQuaternionf.ALIGNOF), - __member(XrVector3f.SIZEOF, XrVector3f.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - ORIENTATION = layout.offsetof(0); - POSITION = layout.offsetof(1); - } - - /** - * Creates a {@code XrPosef} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrPosef(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return a {@link XrQuaternionf} view of the {@code orientation} field. */ - public XrQuaternionf orientation() { return norientation(address()); } - /** @return a {@link XrVector3f} view of the {@code position} field. */ - public XrVector3f position$() { return nposition$(address()); } - - /** Copies the specified {@link XrQuaternionf} to the {@code orientation} field. */ - public XrPosef orientation(XrQuaternionf value) { norientation(address(), value); return this; } - /** Passes the {@code orientation} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrPosef orientation(java.util.function.Consumer consumer) { consumer.accept(orientation()); return this; } - /** Copies the specified {@link XrVector3f} to the {@code position} field. */ - public XrPosef position$(XrVector3f value) { nposition$(address(), value); return this; } - /** Passes the {@code position} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrPosef position$(java.util.function.Consumer consumer) { consumer.accept(position$()); return this; } - - /** Initializes this struct with the specified values. */ - public XrPosef set( - XrQuaternionf orientation, - XrVector3f position$ - ) { - orientation(orientation); - position$(position$); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrPosef set(XrPosef src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrPosef} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrPosef malloc() { - return wrap(XrPosef.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrPosef} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrPosef calloc() { - return wrap(XrPosef.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrPosef} instance allocated with {@link BufferUtils}. */ - public static XrPosef create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrPosef.class, memAddress(container), container); - } - - /** Returns a new {@code XrPosef} instance for the specified memory address. */ - public static XrPosef create(long address) { - return wrap(XrPosef.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrPosef createSafe(long address) { - return address == NULL ? null : wrap(XrPosef.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrPosef.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrPosef} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrPosef malloc(MemoryStack stack) { - return wrap(XrPosef.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrPosef} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrPosef calloc(MemoryStack stack) { - return wrap(XrPosef.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #orientation}. */ - public static XrQuaternionf norientation(long struct) { return XrQuaternionf.create(struct + XrPosef.ORIENTATION); } - /** Unsafe version of {@link #position$}. */ - public static XrVector3f nposition$(long struct) { return XrVector3f.create(struct + XrPosef.POSITION); } - - /** Unsafe version of {@link #orientation(XrQuaternionf) orientation}. */ - public static void norientation(long struct, XrQuaternionf value) { memCopy(value.address(), struct + XrPosef.ORIENTATION, XrQuaternionf.SIZEOF); } - /** Unsafe version of {@link #position$(XrVector3f) position$}. */ - public static void nposition$(long struct, XrVector3f value) { memCopy(value.address(), struct + XrPosef.POSITION, XrVector3f.SIZEOF); } - - // ----------------------------------- - - /** An array of {@link XrPosef} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrPosef ELEMENT_FACTORY = XrPosef.create(-1L); - - /** - * Creates a new {@code XrPosef.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrPosef#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrPosef getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link XrQuaternionf} view of the {@code orientation} field. */ - public XrQuaternionf orientation() { return XrPosef.norientation(address()); } - /** @return a {@link XrVector3f} view of the {@code position} field. */ - public XrVector3f position$() { return XrPosef.nposition$(address()); } - - /** Copies the specified {@link XrQuaternionf} to the {@code orientation} field. */ - public Buffer orientation(XrQuaternionf value) { XrPosef.norientation(address(), value); return this; } - /** Passes the {@code orientation} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer orientation(java.util.function.Consumer consumer) { consumer.accept(orientation()); return this; } - /** Copies the specified {@link XrVector3f} to the {@code position} field. */ - public Buffer position$(XrVector3f value) { XrPosef.nposition$(address(), value); return this; } - /** Passes the {@code position} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer position$(java.util.function.Consumer consumer) { consumer.accept(position$()); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrQuaternionf.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrQuaternionf.java deleted file mode 100644 index 8b0f1dcb..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrQuaternionf.java +++ /dev/null @@ -1,307 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrQuaternionf {
- *     float x;
- *     float y;
- *     float z;
- *     float w;
- * }
- */ -public class XrQuaternionf extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - X, - Y, - Z, - W; - - static { - Layout layout = __struct( - __member(4), - __member(4), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - X = layout.offsetof(0); - Y = layout.offsetof(1); - Z = layout.offsetof(2); - W = layout.offsetof(3); - } - - /** - * Creates a {@code XrQuaternionf} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrQuaternionf(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code x} field. */ - public float x() { return nx(address()); } - /** @return the value of the {@code y} field. */ - public float y() { return ny(address()); } - /** @return the value of the {@code z} field. */ - public float z() { return nz(address()); } - /** @return the value of the {@code w} field. */ - public float w() { return nw(address()); } - - /** Sets the specified value to the {@code x} field. */ - public XrQuaternionf x(float value) { nx(address(), value); return this; } - /** Sets the specified value to the {@code y} field. */ - public XrQuaternionf y(float value) { ny(address(), value); return this; } - /** Sets the specified value to the {@code z} field. */ - public XrQuaternionf z(float value) { nz(address(), value); return this; } - /** Sets the specified value to the {@code w} field. */ - public XrQuaternionf w(float value) { nw(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrQuaternionf set( - float x, - float y, - float z, - float w - ) { - x(x); - y(y); - z(z); - w(w); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrQuaternionf set(XrQuaternionf src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrQuaternionf} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrQuaternionf malloc() { - return wrap(XrQuaternionf.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrQuaternionf} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrQuaternionf calloc() { - return wrap(XrQuaternionf.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrQuaternionf} instance allocated with {@link BufferUtils}. */ - public static XrQuaternionf create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrQuaternionf.class, memAddress(container), container); - } - - /** Returns a new {@code XrQuaternionf} instance for the specified memory address. */ - public static XrQuaternionf create(long address) { - return wrap(XrQuaternionf.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrQuaternionf createSafe(long address) { - return address == NULL ? null : wrap(XrQuaternionf.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrQuaternionf.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrQuaternionf} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrQuaternionf malloc(MemoryStack stack) { - return wrap(XrQuaternionf.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrQuaternionf} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrQuaternionf calloc(MemoryStack stack) { - return wrap(XrQuaternionf.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #x}. */ - public static float nx(long struct) { return UNSAFE.getFloat(null, struct + XrQuaternionf.X); } - /** Unsafe version of {@link #y}. */ - public static float ny(long struct) { return UNSAFE.getFloat(null, struct + XrQuaternionf.Y); } - /** Unsafe version of {@link #z}. */ - public static float nz(long struct) { return UNSAFE.getFloat(null, struct + XrQuaternionf.Z); } - /** Unsafe version of {@link #w}. */ - public static float nw(long struct) { return UNSAFE.getFloat(null, struct + XrQuaternionf.W); } - - /** Unsafe version of {@link #x(float) x}. */ - public static void nx(long struct, float value) { UNSAFE.putFloat(null, struct + XrQuaternionf.X, value); } - /** Unsafe version of {@link #y(float) y}. */ - public static void ny(long struct, float value) { UNSAFE.putFloat(null, struct + XrQuaternionf.Y, value); } - /** Unsafe version of {@link #z(float) z}. */ - public static void nz(long struct, float value) { UNSAFE.putFloat(null, struct + XrQuaternionf.Z, value); } - /** Unsafe version of {@link #w(float) w}. */ - public static void nw(long struct, float value) { UNSAFE.putFloat(null, struct + XrQuaternionf.W, value); } - - // ----------------------------------- - - /** An array of {@link XrQuaternionf} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrQuaternionf ELEMENT_FACTORY = XrQuaternionf.create(-1L); - - /** - * Creates a new {@code XrQuaternionf.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrQuaternionf#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrQuaternionf getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code x} field. */ - public float x() { return XrQuaternionf.nx(address()); } - /** @return the value of the {@code y} field. */ - public float y() { return XrQuaternionf.ny(address()); } - /** @return the value of the {@code z} field. */ - public float z() { return XrQuaternionf.nz(address()); } - /** @return the value of the {@code w} field. */ - public float w() { return XrQuaternionf.nw(address()); } - - /** Sets the specified value to the {@code x} field. */ - public Buffer x(float value) { XrQuaternionf.nx(address(), value); return this; } - /** Sets the specified value to the {@code y} field. */ - public Buffer y(float value) { XrQuaternionf.ny(address(), value); return this; } - /** Sets the specified value to the {@code z} field. */ - public Buffer z(float value) { XrQuaternionf.nz(address(), value); return this; } - /** Sets the specified value to the {@code w} field. */ - public Buffer w(float value) { XrQuaternionf.nw(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrRect2Df.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrRect2Df.java deleted file mode 100644 index 4bc78cfe..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrRect2Df.java +++ /dev/null @@ -1,279 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrRect2Df {
- *     {@link XrOffset2Df XrOffset2Df} offset;
- *     {@link XrExtent2Df XrExtent2Df} extent;
- * }
- */ -public class XrRect2Df extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - OFFSET, - EXTENT; - - static { - Layout layout = __struct( - __member(XrOffset2Df.SIZEOF, XrOffset2Df.ALIGNOF), - __member(XrExtent2Df.SIZEOF, XrExtent2Df.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - OFFSET = layout.offsetof(0); - EXTENT = layout.offsetof(1); - } - - /** - * Creates a {@code XrRect2Df} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrRect2Df(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return a {@link XrOffset2Df} view of the {@code offset} field. */ - public XrOffset2Df offset() { return noffset(address()); } - /** @return a {@link XrExtent2Df} view of the {@code extent} field. */ - public XrExtent2Df extent() { return nextent(address()); } - - /** Copies the specified {@link XrOffset2Df} to the {@code offset} field. */ - public XrRect2Df offset(XrOffset2Df value) { noffset(address(), value); return this; } - /** Passes the {@code offset} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrRect2Df offset(java.util.function.Consumer consumer) { consumer.accept(offset()); return this; } - /** Copies the specified {@link XrExtent2Df} to the {@code extent} field. */ - public XrRect2Df extent(XrExtent2Df value) { nextent(address(), value); return this; } - /** Passes the {@code extent} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrRect2Df extent(java.util.function.Consumer consumer) { consumer.accept(extent()); return this; } - - /** Initializes this struct with the specified values. */ - public XrRect2Df set( - XrOffset2Df offset, - XrExtent2Df extent - ) { - offset(offset); - extent(extent); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrRect2Df set(XrRect2Df src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrRect2Df} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrRect2Df malloc() { - return wrap(XrRect2Df.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrRect2Df} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrRect2Df calloc() { - return wrap(XrRect2Df.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrRect2Df} instance allocated with {@link BufferUtils}. */ - public static XrRect2Df create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrRect2Df.class, memAddress(container), container); - } - - /** Returns a new {@code XrRect2Df} instance for the specified memory address. */ - public static XrRect2Df create(long address) { - return wrap(XrRect2Df.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrRect2Df createSafe(long address) { - return address == NULL ? null : wrap(XrRect2Df.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrRect2Df.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrRect2Df} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrRect2Df malloc(MemoryStack stack) { - return wrap(XrRect2Df.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrRect2Df} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrRect2Df calloc(MemoryStack stack) { - return wrap(XrRect2Df.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #offset}. */ - public static XrOffset2Df noffset(long struct) { return XrOffset2Df.create(struct + XrRect2Df.OFFSET); } - /** Unsafe version of {@link #extent}. */ - public static XrExtent2Df nextent(long struct) { return XrExtent2Df.create(struct + XrRect2Df.EXTENT); } - - /** Unsafe version of {@link #offset(XrOffset2Df) offset}. */ - public static void noffset(long struct, XrOffset2Df value) { memCopy(value.address(), struct + XrRect2Df.OFFSET, XrOffset2Df.SIZEOF); } - /** Unsafe version of {@link #extent(XrExtent2Df) extent}. */ - public static void nextent(long struct, XrExtent2Df value) { memCopy(value.address(), struct + XrRect2Df.EXTENT, XrExtent2Df.SIZEOF); } - - // ----------------------------------- - - /** An array of {@link XrRect2Df} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrRect2Df ELEMENT_FACTORY = XrRect2Df.create(-1L); - - /** - * Creates a new {@code XrRect2Df.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrRect2Df#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrRect2Df getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link XrOffset2Df} view of the {@code offset} field. */ - public XrOffset2Df offset() { return XrRect2Df.noffset(address()); } - /** @return a {@link XrExtent2Df} view of the {@code extent} field. */ - public XrExtent2Df extent() { return XrRect2Df.nextent(address()); } - - /** Copies the specified {@link XrOffset2Df} to the {@code offset} field. */ - public Buffer offset(XrOffset2Df value) { XrRect2Df.noffset(address(), value); return this; } - /** Passes the {@code offset} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer offset(java.util.function.Consumer consumer) { consumer.accept(offset()); return this; } - /** Copies the specified {@link XrExtent2Df} to the {@code extent} field. */ - public Buffer extent(XrExtent2Df value) { XrRect2Df.nextent(address(), value); return this; } - /** Passes the {@code extent} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer extent(java.util.function.Consumer consumer) { consumer.accept(extent()); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrRect2Di.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrRect2Di.java deleted file mode 100644 index caa495a4..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrRect2Di.java +++ /dev/null @@ -1,279 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrRect2Di {
- *     {@link XrOffset2Di XrOffset2Di} offset;
- *     {@link XrExtent2Di XrExtent2Di} extent;
- * }
- */ -public class XrRect2Di extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - OFFSET, - EXTENT; - - static { - Layout layout = __struct( - __member(XrOffset2Di.SIZEOF, XrOffset2Di.ALIGNOF), - __member(XrExtent2Di.SIZEOF, XrExtent2Di.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - OFFSET = layout.offsetof(0); - EXTENT = layout.offsetof(1); - } - - /** - * Creates a {@code XrRect2Di} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrRect2Di(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return a {@link XrOffset2Di} view of the {@code offset} field. */ - public XrOffset2Di offset() { return noffset(address()); } - /** @return a {@link XrExtent2Di} view of the {@code extent} field. */ - public XrExtent2Di extent() { return nextent(address()); } - - /** Copies the specified {@link XrOffset2Di} to the {@code offset} field. */ - public XrRect2Di offset(XrOffset2Di value) { noffset(address(), value); return this; } - /** Passes the {@code offset} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrRect2Di offset(java.util.function.Consumer consumer) { consumer.accept(offset()); return this; } - /** Copies the specified {@link XrExtent2Di} to the {@code extent} field. */ - public XrRect2Di extent(XrExtent2Di value) { nextent(address(), value); return this; } - /** Passes the {@code extent} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrRect2Di extent(java.util.function.Consumer consumer) { consumer.accept(extent()); return this; } - - /** Initializes this struct with the specified values. */ - public XrRect2Di set( - XrOffset2Di offset, - XrExtent2Di extent - ) { - offset(offset); - extent(extent); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrRect2Di set(XrRect2Di src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrRect2Di} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrRect2Di malloc() { - return wrap(XrRect2Di.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrRect2Di} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrRect2Di calloc() { - return wrap(XrRect2Di.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrRect2Di} instance allocated with {@link BufferUtils}. */ - public static XrRect2Di create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrRect2Di.class, memAddress(container), container); - } - - /** Returns a new {@code XrRect2Di} instance for the specified memory address. */ - public static XrRect2Di create(long address) { - return wrap(XrRect2Di.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrRect2Di createSafe(long address) { - return address == NULL ? null : wrap(XrRect2Di.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrRect2Di.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrRect2Di} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrRect2Di malloc(MemoryStack stack) { - return wrap(XrRect2Di.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrRect2Di} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrRect2Di calloc(MemoryStack stack) { - return wrap(XrRect2Di.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #offset}. */ - public static XrOffset2Di noffset(long struct) { return XrOffset2Di.create(struct + XrRect2Di.OFFSET); } - /** Unsafe version of {@link #extent}. */ - public static XrExtent2Di nextent(long struct) { return XrExtent2Di.create(struct + XrRect2Di.EXTENT); } - - /** Unsafe version of {@link #offset(XrOffset2Di) offset}. */ - public static void noffset(long struct, XrOffset2Di value) { memCopy(value.address(), struct + XrRect2Di.OFFSET, XrOffset2Di.SIZEOF); } - /** Unsafe version of {@link #extent(XrExtent2Di) extent}. */ - public static void nextent(long struct, XrExtent2Di value) { memCopy(value.address(), struct + XrRect2Di.EXTENT, XrExtent2Di.SIZEOF); } - - // ----------------------------------- - - /** An array of {@link XrRect2Di} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrRect2Di ELEMENT_FACTORY = XrRect2Di.create(-1L); - - /** - * Creates a new {@code XrRect2Di.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrRect2Di#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrRect2Di getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link XrOffset2Di} view of the {@code offset} field. */ - public XrOffset2Di offset() { return XrRect2Di.noffset(address()); } - /** @return a {@link XrExtent2Di} view of the {@code extent} field. */ - public XrExtent2Di extent() { return XrRect2Di.nextent(address()); } - - /** Copies the specified {@link XrOffset2Di} to the {@code offset} field. */ - public Buffer offset(XrOffset2Di value) { XrRect2Di.noffset(address(), value); return this; } - /** Passes the {@code offset} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer offset(java.util.function.Consumer consumer) { consumer.accept(offset()); return this; } - /** Copies the specified {@link XrExtent2Di} to the {@code extent} field. */ - public Buffer extent(XrExtent2Di value) { XrRect2Di.nextent(address(), value); return this; } - /** Passes the {@code extent} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer extent(java.util.function.Consumer consumer) { consumer.accept(extent()); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrReferenceSpaceCreateInfo.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrReferenceSpaceCreateInfo.java deleted file mode 100644 index b005ee37..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrReferenceSpaceCreateInfo.java +++ /dev/null @@ -1,321 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrReferenceSpaceCreateInfo {
- *     XrStructureType type;
- *     void const * next;
- *     XrReferenceSpaceType referenceSpaceType;
- *     {@link XrPosef XrPosef} poseInReferenceSpace;
- * }
- */ -public class XrReferenceSpaceCreateInfo extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - REFERENCESPACETYPE, - POSEINREFERENCESPACE; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(XrPosef.SIZEOF, XrPosef.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - REFERENCESPACETYPE = layout.offsetof(2); - POSEINREFERENCESPACE = layout.offsetof(3); - } - - /** - * Creates a {@code XrReferenceSpaceCreateInfo} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrReferenceSpaceCreateInfo(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code referenceSpaceType} field. */ - @NativeType("XrReferenceSpaceType") - public int referenceSpaceType() { return nreferenceSpaceType(address()); } - /** @return a {@link XrPosef} view of the {@code poseInReferenceSpace} field. */ - public XrPosef poseInReferenceSpace() { return nposeInReferenceSpace(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrReferenceSpaceCreateInfo type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_REFERENCE_SPACE_CREATE_INFO TYPE_REFERENCE_SPACE_CREATE_INFO} value to the {@code type} field. */ - public XrReferenceSpaceCreateInfo type$Default() { return type(XR10.XR_TYPE_REFERENCE_SPACE_CREATE_INFO); } - /** Sets the specified value to the {@code next} field. */ - public XrReferenceSpaceCreateInfo next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code referenceSpaceType} field. */ - public XrReferenceSpaceCreateInfo referenceSpaceType(@NativeType("XrReferenceSpaceType") int value) { nreferenceSpaceType(address(), value); return this; } - /** Copies the specified {@link XrPosef} to the {@code poseInReferenceSpace} field. */ - public XrReferenceSpaceCreateInfo poseInReferenceSpace(XrPosef value) { nposeInReferenceSpace(address(), value); return this; } - /** Passes the {@code poseInReferenceSpace} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrReferenceSpaceCreateInfo poseInReferenceSpace(java.util.function.Consumer consumer) { consumer.accept(poseInReferenceSpace()); return this; } - - /** Initializes this struct with the specified values. */ - public XrReferenceSpaceCreateInfo set( - int type, - long next, - int referenceSpaceType, - XrPosef poseInReferenceSpace - ) { - type(type); - next(next); - referenceSpaceType(referenceSpaceType); - poseInReferenceSpace(poseInReferenceSpace); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrReferenceSpaceCreateInfo set(XrReferenceSpaceCreateInfo src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrReferenceSpaceCreateInfo} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrReferenceSpaceCreateInfo malloc() { - return wrap(XrReferenceSpaceCreateInfo.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrReferenceSpaceCreateInfo} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrReferenceSpaceCreateInfo calloc() { - return wrap(XrReferenceSpaceCreateInfo.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrReferenceSpaceCreateInfo} instance allocated with {@link BufferUtils}. */ - public static XrReferenceSpaceCreateInfo create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrReferenceSpaceCreateInfo.class, memAddress(container), container); - } - - /** Returns a new {@code XrReferenceSpaceCreateInfo} instance for the specified memory address. */ - public static XrReferenceSpaceCreateInfo create(long address) { - return wrap(XrReferenceSpaceCreateInfo.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrReferenceSpaceCreateInfo createSafe(long address) { - return address == NULL ? null : wrap(XrReferenceSpaceCreateInfo.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrReferenceSpaceCreateInfo.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrReferenceSpaceCreateInfo} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrReferenceSpaceCreateInfo malloc(MemoryStack stack) { - return wrap(XrReferenceSpaceCreateInfo.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrReferenceSpaceCreateInfo} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrReferenceSpaceCreateInfo calloc(MemoryStack stack) { - return wrap(XrReferenceSpaceCreateInfo.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrReferenceSpaceCreateInfo.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrReferenceSpaceCreateInfo.NEXT); } - /** Unsafe version of {@link #referenceSpaceType}. */ - public static int nreferenceSpaceType(long struct) { return UNSAFE.getInt(null, struct + XrReferenceSpaceCreateInfo.REFERENCESPACETYPE); } - /** Unsafe version of {@link #poseInReferenceSpace}. */ - public static XrPosef nposeInReferenceSpace(long struct) { return XrPosef.create(struct + XrReferenceSpaceCreateInfo.POSEINREFERENCESPACE); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrReferenceSpaceCreateInfo.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrReferenceSpaceCreateInfo.NEXT, value); } - /** Unsafe version of {@link #referenceSpaceType(int) referenceSpaceType}. */ - public static void nreferenceSpaceType(long struct, int value) { UNSAFE.putInt(null, struct + XrReferenceSpaceCreateInfo.REFERENCESPACETYPE, value); } - /** Unsafe version of {@link #poseInReferenceSpace(XrPosef) poseInReferenceSpace}. */ - public static void nposeInReferenceSpace(long struct, XrPosef value) { memCopy(value.address(), struct + XrReferenceSpaceCreateInfo.POSEINREFERENCESPACE, XrPosef.SIZEOF); } - - // ----------------------------------- - - /** An array of {@link XrReferenceSpaceCreateInfo} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrReferenceSpaceCreateInfo ELEMENT_FACTORY = XrReferenceSpaceCreateInfo.create(-1L); - - /** - * Creates a new {@code XrReferenceSpaceCreateInfo.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrReferenceSpaceCreateInfo#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrReferenceSpaceCreateInfo getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrReferenceSpaceCreateInfo.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrReferenceSpaceCreateInfo.nnext(address()); } - /** @return the value of the {@code referenceSpaceType} field. */ - @NativeType("XrReferenceSpaceType") - public int referenceSpaceType() { return XrReferenceSpaceCreateInfo.nreferenceSpaceType(address()); } - /** @return a {@link XrPosef} view of the {@code poseInReferenceSpace} field. */ - public XrPosef poseInReferenceSpace() { return XrReferenceSpaceCreateInfo.nposeInReferenceSpace(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrReferenceSpaceCreateInfo.ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_REFERENCE_SPACE_CREATE_INFO TYPE_REFERENCE_SPACE_CREATE_INFO} value to the {@code type} field. */ - public Buffer type$Default() { return type(XR10.XR_TYPE_REFERENCE_SPACE_CREATE_INFO); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrReferenceSpaceCreateInfo.nnext(address(), value); return this; } - /** Sets the specified value to the {@code referenceSpaceType} field. */ - public Buffer referenceSpaceType(@NativeType("XrReferenceSpaceType") int value) { XrReferenceSpaceCreateInfo.nreferenceSpaceType(address(), value); return this; } - /** Copies the specified {@link XrPosef} to the {@code poseInReferenceSpace} field. */ - public Buffer poseInReferenceSpace(XrPosef value) { XrReferenceSpaceCreateInfo.nposeInReferenceSpace(address(), value); return this; } - /** Passes the {@code poseInReferenceSpace} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer poseInReferenceSpace(java.util.function.Consumer consumer) { consumer.accept(poseInReferenceSpace()); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneBoundsMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneBoundsMSFT.java deleted file mode 100644 index d967e4d4..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneBoundsMSFT.java +++ /dev/null @@ -1,423 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSceneBoundsMSFT {
- *     XrSpace space;
- *     XrTime time;
- *     uint32_t sphereCount;
- *     {@link XrSceneSphereBoundMSFT XrSceneSphereBoundMSFT} const * spheres;
- *     uint32_t boxCount;
- *     {@link XrSceneOrientedBoxBoundMSFT XrSceneOrientedBoxBoundMSFT} const * boxes;
- *     uint32_t frustumCount;
- *     {@link XrSceneFrustumBoundMSFT XrSceneFrustumBoundMSFT} const * frustums;
- * }
- */ -public class XrSceneBoundsMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - SPACE, - TIME, - SPHERECOUNT, - SPHERES, - BOXCOUNT, - BOXES, - FRUSTUMCOUNT, - FRUSTUMS; - - static { - Layout layout = __struct( - __member(POINTER_SIZE), - __member(8), - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - SPACE = layout.offsetof(0); - TIME = layout.offsetof(1); - SPHERECOUNT = layout.offsetof(2); - SPHERES = layout.offsetof(3); - BOXCOUNT = layout.offsetof(4); - BOXES = layout.offsetof(5); - FRUSTUMCOUNT = layout.offsetof(6); - FRUSTUMS = layout.offsetof(7); - } - - /** - * Creates a {@code XrSceneBoundsMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSceneBoundsMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code space} field. */ - @NativeType("XrSpace") - public long space() { return nspace(address()); } - /** @return the value of the {@code time} field. */ - @NativeType("XrTime") - public long time() { return ntime(address()); } - /** @return the value of the {@code sphereCount} field. */ - @NativeType("uint32_t") - public int sphereCount() { return nsphereCount(address()); } - /** @return a {@link XrSceneSphereBoundMSFT.Buffer} view of the struct array pointed to by the {@code spheres} field. */ - @Nullable - @NativeType("XrSceneSphereBoundMSFT const *") - public XrSceneSphereBoundMSFT.Buffer spheres() { return nspheres(address()); } - /** @return the value of the {@code boxCount} field. */ - @NativeType("uint32_t") - public int boxCount() { return nboxCount(address()); } - /** @return a {@link XrSceneOrientedBoxBoundMSFT.Buffer} view of the struct array pointed to by the {@code boxes} field. */ - @Nullable - @NativeType("XrSceneOrientedBoxBoundMSFT const *") - public XrSceneOrientedBoxBoundMSFT.Buffer boxes() { return nboxes(address()); } - /** @return the value of the {@code frustumCount} field. */ - @NativeType("uint32_t") - public int frustumCount() { return nfrustumCount(address()); } - /** @return a {@link XrSceneFrustumBoundMSFT.Buffer} view of the struct array pointed to by the {@code frustums} field. */ - @Nullable - @NativeType("XrSceneFrustumBoundMSFT const *") - public XrSceneFrustumBoundMSFT.Buffer frustums() { return nfrustums(address()); } - - /** Sets the specified value to the {@code space} field. */ - public XrSceneBoundsMSFT space(XrSpace value) { nspace(address(), value); return this; } - /** Sets the specified value to the {@code time} field. */ - public XrSceneBoundsMSFT time(@NativeType("XrTime") long value) { ntime(address(), value); return this; } - /** Sets the specified value to the {@code sphereCount} field. */ - public XrSceneBoundsMSFT sphereCount(@NativeType("uint32_t") int value) { nsphereCount(address(), value); return this; } - /** Sets the address of the specified {@link XrSceneSphereBoundMSFT.Buffer} to the {@code spheres} field. */ - public XrSceneBoundsMSFT spheres(@Nullable @NativeType("XrSceneSphereBoundMSFT const *") XrSceneSphereBoundMSFT.Buffer value) { nspheres(address(), value); return this; } - /** Sets the specified value to the {@code boxCount} field. */ - public XrSceneBoundsMSFT boxCount(@NativeType("uint32_t") int value) { nboxCount(address(), value); return this; } - /** Sets the address of the specified {@link XrSceneOrientedBoxBoundMSFT.Buffer} to the {@code boxes} field. */ - public XrSceneBoundsMSFT boxes(@Nullable @NativeType("XrSceneOrientedBoxBoundMSFT const *") XrSceneOrientedBoxBoundMSFT.Buffer value) { nboxes(address(), value); return this; } - /** Sets the specified value to the {@code frustumCount} field. */ - public XrSceneBoundsMSFT frustumCount(@NativeType("uint32_t") int value) { nfrustumCount(address(), value); return this; } - /** Sets the address of the specified {@link XrSceneFrustumBoundMSFT.Buffer} to the {@code frustums} field. */ - public XrSceneBoundsMSFT frustums(@Nullable @NativeType("XrSceneFrustumBoundMSFT const *") XrSceneFrustumBoundMSFT.Buffer value) { nfrustums(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrSceneBoundsMSFT set( - XrSpace space, - long time, - int sphereCount, - @Nullable XrSceneSphereBoundMSFT.Buffer spheres, - int boxCount, - @Nullable XrSceneOrientedBoxBoundMSFT.Buffer boxes, - int frustumCount, - @Nullable XrSceneFrustumBoundMSFT.Buffer frustums - ) { - space(space); - time(time); - sphereCount(sphereCount); - spheres(spheres); - boxCount(boxCount); - boxes(boxes); - frustumCount(frustumCount); - frustums(frustums); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSceneBoundsMSFT set(XrSceneBoundsMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSceneBoundsMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSceneBoundsMSFT malloc() { - return wrap(XrSceneBoundsMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSceneBoundsMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSceneBoundsMSFT calloc() { - return wrap(XrSceneBoundsMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSceneBoundsMSFT} instance allocated with {@link BufferUtils}. */ - public static XrSceneBoundsMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSceneBoundsMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrSceneBoundsMSFT} instance for the specified memory address. */ - public static XrSceneBoundsMSFT create(long address) { - return wrap(XrSceneBoundsMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSceneBoundsMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrSceneBoundsMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSceneBoundsMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSceneBoundsMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSceneBoundsMSFT malloc(MemoryStack stack) { - return wrap(XrSceneBoundsMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSceneBoundsMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSceneBoundsMSFT calloc(MemoryStack stack) { - return wrap(XrSceneBoundsMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #space}. */ - public static long nspace(long struct) { return memGetAddress(struct + XrSceneBoundsMSFT.SPACE); } - /** Unsafe version of {@link #time}. */ - public static long ntime(long struct) { return UNSAFE.getLong(null, struct + XrSceneBoundsMSFT.TIME); } - /** Unsafe version of {@link #sphereCount}. */ - public static int nsphereCount(long struct) { return UNSAFE.getInt(null, struct + XrSceneBoundsMSFT.SPHERECOUNT); } - /** Unsafe version of {@link #spheres}. */ - @Nullable public static XrSceneSphereBoundMSFT.Buffer nspheres(long struct) { return XrSceneSphereBoundMSFT.createSafe(memGetAddress(struct + XrSceneBoundsMSFT.SPHERES), nsphereCount(struct)); } - /** Unsafe version of {@link #boxCount}. */ - public static int nboxCount(long struct) { return UNSAFE.getInt(null, struct + XrSceneBoundsMSFT.BOXCOUNT); } - /** Unsafe version of {@link #boxes}. */ - @Nullable public static XrSceneOrientedBoxBoundMSFT.Buffer nboxes(long struct) { return XrSceneOrientedBoxBoundMSFT.createSafe(memGetAddress(struct + XrSceneBoundsMSFT.BOXES), nboxCount(struct)); } - /** Unsafe version of {@link #frustumCount}. */ - public static int nfrustumCount(long struct) { return UNSAFE.getInt(null, struct + XrSceneBoundsMSFT.FRUSTUMCOUNT); } - /** Unsafe version of {@link #frustums}. */ - @Nullable public static XrSceneFrustumBoundMSFT.Buffer nfrustums(long struct) { return XrSceneFrustumBoundMSFT.createSafe(memGetAddress(struct + XrSceneBoundsMSFT.FRUSTUMS), nfrustumCount(struct)); } - - /** Unsafe version of {@link #space(XrSpace) space}. */ - public static void nspace(long struct, XrSpace value) { memPutAddress(struct + XrSceneBoundsMSFT.SPACE, value.address()); } - /** Unsafe version of {@link #time(long) time}. */ - public static void ntime(long struct, long value) { UNSAFE.putLong(null, struct + XrSceneBoundsMSFT.TIME, value); } - /** Sets the specified value to the {@code sphereCount} field of the specified {@code struct}. */ - public static void nsphereCount(long struct, int value) { UNSAFE.putInt(null, struct + XrSceneBoundsMSFT.SPHERECOUNT, value); } - /** Unsafe version of {@link #spheres(XrSceneSphereBoundMSFT.Buffer) spheres}. */ - public static void nspheres(long struct, @Nullable XrSceneSphereBoundMSFT.Buffer value) { memPutAddress(struct + XrSceneBoundsMSFT.SPHERES, memAddressSafe(value)); if (value != null) { nsphereCount(struct, value.remaining()); } } - /** Sets the specified value to the {@code boxCount} field of the specified {@code struct}. */ - public static void nboxCount(long struct, int value) { UNSAFE.putInt(null, struct + XrSceneBoundsMSFT.BOXCOUNT, value); } - /** Unsafe version of {@link #boxes(XrSceneOrientedBoxBoundMSFT.Buffer) boxes}. */ - public static void nboxes(long struct, @Nullable XrSceneOrientedBoxBoundMSFT.Buffer value) { memPutAddress(struct + XrSceneBoundsMSFT.BOXES, memAddressSafe(value)); if (value != null) { nboxCount(struct, value.remaining()); } } - /** Sets the specified value to the {@code frustumCount} field of the specified {@code struct}. */ - public static void nfrustumCount(long struct, int value) { UNSAFE.putInt(null, struct + XrSceneBoundsMSFT.FRUSTUMCOUNT, value); } - /** Unsafe version of {@link #frustums(XrSceneFrustumBoundMSFT.Buffer) frustums}. */ - public static void nfrustums(long struct, @Nullable XrSceneFrustumBoundMSFT.Buffer value) { memPutAddress(struct + XrSceneBoundsMSFT.FRUSTUMS, memAddressSafe(value)); if (value != null) { nfrustumCount(struct, value.remaining()); } } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XrSceneBoundsMSFT.SPACE)); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrSceneBoundsMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSceneBoundsMSFT ELEMENT_FACTORY = XrSceneBoundsMSFT.create(-1L); - - /** - * Creates a new {@code XrSceneBoundsMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSceneBoundsMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSceneBoundsMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code space} field. */ - @NativeType("XrSpace") - public long space() { return XrSceneBoundsMSFT.nspace(address()); } - /** @return the value of the {@code time} field. */ - @NativeType("XrTime") - public long time() { return XrSceneBoundsMSFT.ntime(address()); } - /** @return the value of the {@code sphereCount} field. */ - @NativeType("uint32_t") - public int sphereCount() { return XrSceneBoundsMSFT.nsphereCount(address()); } - /** @return a {@link XrSceneSphereBoundMSFT.Buffer} view of the struct array pointed to by the {@code spheres} field. */ - @Nullable - @NativeType("XrSceneSphereBoundMSFT const *") - public XrSceneSphereBoundMSFT.Buffer spheres() { return XrSceneBoundsMSFT.nspheres(address()); } - /** @return the value of the {@code boxCount} field. */ - @NativeType("uint32_t") - public int boxCount() { return XrSceneBoundsMSFT.nboxCount(address()); } - /** @return a {@link XrSceneOrientedBoxBoundMSFT.Buffer} view of the struct array pointed to by the {@code boxes} field. */ - @Nullable - @NativeType("XrSceneOrientedBoxBoundMSFT const *") - public XrSceneOrientedBoxBoundMSFT.Buffer boxes() { return XrSceneBoundsMSFT.nboxes(address()); } - /** @return the value of the {@code frustumCount} field. */ - @NativeType("uint32_t") - public int frustumCount() { return XrSceneBoundsMSFT.nfrustumCount(address()); } - /** @return a {@link XrSceneFrustumBoundMSFT.Buffer} view of the struct array pointed to by the {@code frustums} field. */ - @Nullable - @NativeType("XrSceneFrustumBoundMSFT const *") - public XrSceneFrustumBoundMSFT.Buffer frustums() { return XrSceneBoundsMSFT.nfrustums(address()); } - - /** Sets the specified value to the {@code space} field. */ - public Buffer space(XrSpace value) { XrSceneBoundsMSFT.nspace(address(), value); return this; } - /** Sets the specified value to the {@code time} field. */ - public Buffer time(@NativeType("XrTime") long value) { XrSceneBoundsMSFT.ntime(address(), value); return this; } - /** Sets the specified value to the {@code sphereCount} field. */ - public Buffer sphereCount(@NativeType("uint32_t") int value) { XrSceneBoundsMSFT.nsphereCount(address(), value); return this; } - /** Sets the address of the specified {@link XrSceneSphereBoundMSFT.Buffer} to the {@code spheres} field. */ - public Buffer spheres(@Nullable @NativeType("XrSceneSphereBoundMSFT const *") XrSceneSphereBoundMSFT.Buffer value) { XrSceneBoundsMSFT.nspheres(address(), value); return this; } - /** Sets the specified value to the {@code boxCount} field. */ - public Buffer boxCount(@NativeType("uint32_t") int value) { XrSceneBoundsMSFT.nboxCount(address(), value); return this; } - /** Sets the address of the specified {@link XrSceneOrientedBoxBoundMSFT.Buffer} to the {@code boxes} field. */ - public Buffer boxes(@Nullable @NativeType("XrSceneOrientedBoxBoundMSFT const *") XrSceneOrientedBoxBoundMSFT.Buffer value) { XrSceneBoundsMSFT.nboxes(address(), value); return this; } - /** Sets the specified value to the {@code frustumCount} field. */ - public Buffer frustumCount(@NativeType("uint32_t") int value) { XrSceneBoundsMSFT.nfrustumCount(address(), value); return this; } - /** Sets the address of the specified {@link XrSceneFrustumBoundMSFT.Buffer} to the {@code frustums} field. */ - public Buffer frustums(@Nullable @NativeType("XrSceneFrustumBoundMSFT const *") XrSceneFrustumBoundMSFT.Buffer value) { XrSceneBoundsMSFT.nfrustums(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneComponentLocationMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneComponentLocationMSFT.java deleted file mode 100644 index 38442bd4..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneComponentLocationMSFT.java +++ /dev/null @@ -1,277 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSceneComponentLocationMSFT {
- *     XrSpaceLocationFlags flags;
- *     {@link XrPosef XrPosef} pose;
- * }
- */ -public class XrSceneComponentLocationMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - FLAGS, - POSE; - - static { - Layout layout = __struct( - __member(8), - __member(XrPosef.SIZEOF, XrPosef.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - FLAGS = layout.offsetof(0); - POSE = layout.offsetof(1); - } - - /** - * Creates a {@code XrSceneComponentLocationMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSceneComponentLocationMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code flags} field. */ - @NativeType("XrSpaceLocationFlags") - public long flags() { return nflags(address()); } - /** @return a {@link XrPosef} view of the {@code pose} field. */ - public XrPosef pose() { return npose(address()); } - - /** Sets the specified value to the {@code flags} field. */ - public XrSceneComponentLocationMSFT flags(@NativeType("XrSpaceLocationFlags") long value) { nflags(address(), value); return this; } - /** Copies the specified {@link XrPosef} to the {@code pose} field. */ - public XrSceneComponentLocationMSFT pose(XrPosef value) { npose(address(), value); return this; } - /** Passes the {@code pose} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrSceneComponentLocationMSFT pose(java.util.function.Consumer consumer) { consumer.accept(pose()); return this; } - - /** Initializes this struct with the specified values. */ - public XrSceneComponentLocationMSFT set( - long flags, - XrPosef pose - ) { - flags(flags); - pose(pose); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSceneComponentLocationMSFT set(XrSceneComponentLocationMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSceneComponentLocationMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSceneComponentLocationMSFT malloc() { - return wrap(XrSceneComponentLocationMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSceneComponentLocationMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSceneComponentLocationMSFT calloc() { - return wrap(XrSceneComponentLocationMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSceneComponentLocationMSFT} instance allocated with {@link BufferUtils}. */ - public static XrSceneComponentLocationMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSceneComponentLocationMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrSceneComponentLocationMSFT} instance for the specified memory address. */ - public static XrSceneComponentLocationMSFT create(long address) { - return wrap(XrSceneComponentLocationMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSceneComponentLocationMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrSceneComponentLocationMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSceneComponentLocationMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSceneComponentLocationMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSceneComponentLocationMSFT malloc(MemoryStack stack) { - return wrap(XrSceneComponentLocationMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSceneComponentLocationMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSceneComponentLocationMSFT calloc(MemoryStack stack) { - return wrap(XrSceneComponentLocationMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #flags}. */ - public static long nflags(long struct) { return UNSAFE.getLong(null, struct + XrSceneComponentLocationMSFT.FLAGS); } - /** Unsafe version of {@link #pose}. */ - public static XrPosef npose(long struct) { return XrPosef.create(struct + XrSceneComponentLocationMSFT.POSE); } - - /** Unsafe version of {@link #flags(long) flags}. */ - public static void nflags(long struct, long value) { UNSAFE.putLong(null, struct + XrSceneComponentLocationMSFT.FLAGS, value); } - /** Unsafe version of {@link #pose(XrPosef) pose}. */ - public static void npose(long struct, XrPosef value) { memCopy(value.address(), struct + XrSceneComponentLocationMSFT.POSE, XrPosef.SIZEOF); } - - // ----------------------------------- - - /** An array of {@link XrSceneComponentLocationMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSceneComponentLocationMSFT ELEMENT_FACTORY = XrSceneComponentLocationMSFT.create(-1L); - - /** - * Creates a new {@code XrSceneComponentLocationMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSceneComponentLocationMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSceneComponentLocationMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code flags} field. */ - @NativeType("XrSpaceLocationFlags") - public long flags() { return XrSceneComponentLocationMSFT.nflags(address()); } - /** @return a {@link XrPosef} view of the {@code pose} field. */ - public XrPosef pose() { return XrSceneComponentLocationMSFT.npose(address()); } - - /** Sets the specified value to the {@code flags} field. */ - public Buffer flags(@NativeType("XrSpaceLocationFlags") long value) { XrSceneComponentLocationMSFT.nflags(address(), value); return this; } - /** Copies the specified {@link XrPosef} to the {@code pose} field. */ - public Buffer pose(XrPosef value) { XrSceneComponentLocationMSFT.npose(address(), value); return this; } - /** Passes the {@code pose} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer pose(java.util.function.Consumer consumer) { consumer.accept(pose()); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneComponentLocationsMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneComponentLocationsMSFT.java deleted file mode 100644 index ba0d5ac7..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneComponentLocationsMSFT.java +++ /dev/null @@ -1,321 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSceneComponentLocationsMSFT {
- *     XrStructureType type;
- *     void * next;
- *     uint32_t locationCount;
- *     {@link XrSceneComponentLocationMSFT XrSceneComponentLocationMSFT} * locations;
- * }
- */ -public class XrSceneComponentLocationsMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - LOCATIONCOUNT, - LOCATIONS; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - LOCATIONCOUNT = layout.offsetof(2); - LOCATIONS = layout.offsetof(3); - } - - /** - * Creates a {@code XrSceneComponentLocationsMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSceneComponentLocationsMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return the value of the {@code locationCount} field. */ - @NativeType("uint32_t") - public int locationCount() { return nlocationCount(address()); } - /** @return a {@link XrSceneComponentLocationMSFT.Buffer} view of the struct array pointed to by the {@code locations} field. */ - @Nullable - @NativeType("XrSceneComponentLocationMSFT *") - public XrSceneComponentLocationMSFT.Buffer locations() { return nlocations(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrSceneComponentLocationsMSFT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link MSFTSceneUnderstanding#XR_TYPE_SCENE_COMPONENT_LOCATIONS_MSFT TYPE_SCENE_COMPONENT_LOCATIONS_MSFT} value to the {@code type} field. */ - public XrSceneComponentLocationsMSFT type$Default() { return type(MSFTSceneUnderstanding.XR_TYPE_SCENE_COMPONENT_LOCATIONS_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public XrSceneComponentLocationsMSFT next(@NativeType("void *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code locationCount} field. */ - public XrSceneComponentLocationsMSFT locationCount(@NativeType("uint32_t") int value) { nlocationCount(address(), value); return this; } - /** Sets the address of the specified {@link XrSceneComponentLocationMSFT.Buffer} to the {@code locations} field. */ - public XrSceneComponentLocationsMSFT locations(@Nullable @NativeType("XrSceneComponentLocationMSFT *") XrSceneComponentLocationMSFT.Buffer value) { nlocations(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrSceneComponentLocationsMSFT set( - int type, - long next, - int locationCount, - @Nullable XrSceneComponentLocationMSFT.Buffer locations - ) { - type(type); - next(next); - locationCount(locationCount); - locations(locations); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSceneComponentLocationsMSFT set(XrSceneComponentLocationsMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSceneComponentLocationsMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSceneComponentLocationsMSFT malloc() { - return wrap(XrSceneComponentLocationsMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSceneComponentLocationsMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSceneComponentLocationsMSFT calloc() { - return wrap(XrSceneComponentLocationsMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSceneComponentLocationsMSFT} instance allocated with {@link BufferUtils}. */ - public static XrSceneComponentLocationsMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSceneComponentLocationsMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrSceneComponentLocationsMSFT} instance for the specified memory address. */ - public static XrSceneComponentLocationsMSFT create(long address) { - return wrap(XrSceneComponentLocationsMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSceneComponentLocationsMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrSceneComponentLocationsMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSceneComponentLocationsMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSceneComponentLocationsMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSceneComponentLocationsMSFT malloc(MemoryStack stack) { - return wrap(XrSceneComponentLocationsMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSceneComponentLocationsMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSceneComponentLocationsMSFT calloc(MemoryStack stack) { - return wrap(XrSceneComponentLocationsMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSceneComponentLocationsMSFT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSceneComponentLocationsMSFT.NEXT); } - /** Unsafe version of {@link #locationCount}. */ - public static int nlocationCount(long struct) { return UNSAFE.getInt(null, struct + XrSceneComponentLocationsMSFT.LOCATIONCOUNT); } - /** Unsafe version of {@link #locations}. */ - @Nullable public static XrSceneComponentLocationMSFT.Buffer nlocations(long struct) { return XrSceneComponentLocationMSFT.createSafe(memGetAddress(struct + XrSceneComponentLocationsMSFT.LOCATIONS), nlocationCount(struct)); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSceneComponentLocationsMSFT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSceneComponentLocationsMSFT.NEXT, value); } - /** Sets the specified value to the {@code locationCount} field of the specified {@code struct}. */ - public static void nlocationCount(long struct, int value) { UNSAFE.putInt(null, struct + XrSceneComponentLocationsMSFT.LOCATIONCOUNT, value); } - /** Unsafe version of {@link #locations(XrSceneComponentLocationMSFT.Buffer) locations}. */ - public static void nlocations(long struct, @Nullable XrSceneComponentLocationMSFT.Buffer value) { memPutAddress(struct + XrSceneComponentLocationsMSFT.LOCATIONS, memAddressSafe(value)); if (value != null) { nlocationCount(struct, value.remaining()); } } - - // ----------------------------------- - - /** An array of {@link XrSceneComponentLocationsMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSceneComponentLocationsMSFT ELEMENT_FACTORY = XrSceneComponentLocationsMSFT.create(-1L); - - /** - * Creates a new {@code XrSceneComponentLocationsMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSceneComponentLocationsMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSceneComponentLocationsMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSceneComponentLocationsMSFT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrSceneComponentLocationsMSFT.nnext(address()); } - /** @return the value of the {@code locationCount} field. */ - @NativeType("uint32_t") - public int locationCount() { return XrSceneComponentLocationsMSFT.nlocationCount(address()); } - /** @return a {@link XrSceneComponentLocationMSFT.Buffer} view of the struct array pointed to by the {@code locations} field. */ - @Nullable - @NativeType("XrSceneComponentLocationMSFT *") - public XrSceneComponentLocationMSFT.Buffer locations() { return XrSceneComponentLocationsMSFT.nlocations(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSceneComponentLocationsMSFT.ntype(address(), value); return this; } - /** Sets the {@link MSFTSceneUnderstanding#XR_TYPE_SCENE_COMPONENT_LOCATIONS_MSFT TYPE_SCENE_COMPONENT_LOCATIONS_MSFT} value to the {@code type} field. */ - public Buffer type$Default() { return type(MSFTSceneUnderstanding.XR_TYPE_SCENE_COMPONENT_LOCATIONS_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrSceneComponentLocationsMSFT.nnext(address(), value); return this; } - /** Sets the specified value to the {@code locationCount} field. */ - public Buffer locationCount(@NativeType("uint32_t") int value) { XrSceneComponentLocationsMSFT.nlocationCount(address(), value); return this; } - /** Sets the address of the specified {@link XrSceneComponentLocationMSFT.Buffer} to the {@code locations} field. */ - public Buffer locations(@Nullable @NativeType("XrSceneComponentLocationMSFT *") XrSceneComponentLocationMSFT.Buffer value) { XrSceneComponentLocationsMSFT.nlocations(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneComponentMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneComponentMSFT.java deleted file mode 100644 index ec62f114..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneComponentMSFT.java +++ /dev/null @@ -1,319 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSceneComponentMSFT {
- *     XrSceneComponentTypeMSFT componentType;
- *     {@link XrUuidMSFT XrUuidMSFT} id;
- *     {@link XrUuidMSFT XrUuidMSFT} parentId;
- *     XrTime updateTime;
- * }
- */ -public class XrSceneComponentMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - COMPONENTTYPE, - ID, - PARENTID, - UPDATETIME; - - static { - Layout layout = __struct( - __member(4), - __member(XrUuidMSFT.SIZEOF, XrUuidMSFT.ALIGNOF), - __member(XrUuidMSFT.SIZEOF, XrUuidMSFT.ALIGNOF), - __member(8) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - COMPONENTTYPE = layout.offsetof(0); - ID = layout.offsetof(1); - PARENTID = layout.offsetof(2); - UPDATETIME = layout.offsetof(3); - } - - /** - * Creates a {@code XrSceneComponentMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSceneComponentMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code componentType} field. */ - @NativeType("XrSceneComponentTypeMSFT") - public int componentType() { return ncomponentType(address()); } - /** @return a {@link XrUuidMSFT} view of the {@code id} field. */ - public XrUuidMSFT id() { return nid(address()); } - /** @return a {@link XrUuidMSFT} view of the {@code parentId} field. */ - public XrUuidMSFT parentId() { return nparentId(address()); } - /** @return the value of the {@code updateTime} field. */ - @NativeType("XrTime") - public long updateTime() { return nupdateTime(address()); } - - /** Sets the specified value to the {@code componentType} field. */ - public XrSceneComponentMSFT componentType(@NativeType("XrSceneComponentTypeMSFT") int value) { ncomponentType(address(), value); return this; } - /** Copies the specified {@link XrUuidMSFT} to the {@code id} field. */ - public XrSceneComponentMSFT id(XrUuidMSFT value) { nid(address(), value); return this; } - /** Passes the {@code id} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrSceneComponentMSFT id(java.util.function.Consumer consumer) { consumer.accept(id()); return this; } - /** Copies the specified {@link XrUuidMSFT} to the {@code parentId} field. */ - public XrSceneComponentMSFT parentId(XrUuidMSFT value) { nparentId(address(), value); return this; } - /** Passes the {@code parentId} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrSceneComponentMSFT parentId(java.util.function.Consumer consumer) { consumer.accept(parentId()); return this; } - /** Sets the specified value to the {@code updateTime} field. */ - public XrSceneComponentMSFT updateTime(@NativeType("XrTime") long value) { nupdateTime(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrSceneComponentMSFT set( - int componentType, - XrUuidMSFT id, - XrUuidMSFT parentId, - long updateTime - ) { - componentType(componentType); - id(id); - parentId(parentId); - updateTime(updateTime); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSceneComponentMSFT set(XrSceneComponentMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSceneComponentMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSceneComponentMSFT malloc() { - return wrap(XrSceneComponentMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSceneComponentMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSceneComponentMSFT calloc() { - return wrap(XrSceneComponentMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSceneComponentMSFT} instance allocated with {@link BufferUtils}. */ - public static XrSceneComponentMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSceneComponentMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrSceneComponentMSFT} instance for the specified memory address. */ - public static XrSceneComponentMSFT create(long address) { - return wrap(XrSceneComponentMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSceneComponentMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrSceneComponentMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSceneComponentMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSceneComponentMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSceneComponentMSFT malloc(MemoryStack stack) { - return wrap(XrSceneComponentMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSceneComponentMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSceneComponentMSFT calloc(MemoryStack stack) { - return wrap(XrSceneComponentMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #componentType}. */ - public static int ncomponentType(long struct) { return UNSAFE.getInt(null, struct + XrSceneComponentMSFT.COMPONENTTYPE); } - /** Unsafe version of {@link #id}. */ - public static XrUuidMSFT nid(long struct) { return XrUuidMSFT.create(struct + XrSceneComponentMSFT.ID); } - /** Unsafe version of {@link #parentId}. */ - public static XrUuidMSFT nparentId(long struct) { return XrUuidMSFT.create(struct + XrSceneComponentMSFT.PARENTID); } - /** Unsafe version of {@link #updateTime}. */ - public static long nupdateTime(long struct) { return UNSAFE.getLong(null, struct + XrSceneComponentMSFT.UPDATETIME); } - - /** Unsafe version of {@link #componentType(int) componentType}. */ - public static void ncomponentType(long struct, int value) { UNSAFE.putInt(null, struct + XrSceneComponentMSFT.COMPONENTTYPE, value); } - /** Unsafe version of {@link #id(XrUuidMSFT) id}. */ - public static void nid(long struct, XrUuidMSFT value) { memCopy(value.address(), struct + XrSceneComponentMSFT.ID, XrUuidMSFT.SIZEOF); } - /** Unsafe version of {@link #parentId(XrUuidMSFT) parentId}. */ - public static void nparentId(long struct, XrUuidMSFT value) { memCopy(value.address(), struct + XrSceneComponentMSFT.PARENTID, XrUuidMSFT.SIZEOF); } - /** Unsafe version of {@link #updateTime(long) updateTime}. */ - public static void nupdateTime(long struct, long value) { UNSAFE.putLong(null, struct + XrSceneComponentMSFT.UPDATETIME, value); } - - // ----------------------------------- - - /** An array of {@link XrSceneComponentMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSceneComponentMSFT ELEMENT_FACTORY = XrSceneComponentMSFT.create(-1L); - - /** - * Creates a new {@code XrSceneComponentMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSceneComponentMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSceneComponentMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code componentType} field. */ - @NativeType("XrSceneComponentTypeMSFT") - public int componentType() { return XrSceneComponentMSFT.ncomponentType(address()); } - /** @return a {@link XrUuidMSFT} view of the {@code id} field. */ - public XrUuidMSFT id() { return XrSceneComponentMSFT.nid(address()); } - /** @return a {@link XrUuidMSFT} view of the {@code parentId} field. */ - public XrUuidMSFT parentId() { return XrSceneComponentMSFT.nparentId(address()); } - /** @return the value of the {@code updateTime} field. */ - @NativeType("XrTime") - public long updateTime() { return XrSceneComponentMSFT.nupdateTime(address()); } - - /** Sets the specified value to the {@code componentType} field. */ - public Buffer componentType(@NativeType("XrSceneComponentTypeMSFT") int value) { XrSceneComponentMSFT.ncomponentType(address(), value); return this; } - /** Copies the specified {@link XrUuidMSFT} to the {@code id} field. */ - public Buffer id(XrUuidMSFT value) { XrSceneComponentMSFT.nid(address(), value); return this; } - /** Passes the {@code id} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer id(java.util.function.Consumer consumer) { consumer.accept(id()); return this; } - /** Copies the specified {@link XrUuidMSFT} to the {@code parentId} field. */ - public Buffer parentId(XrUuidMSFT value) { XrSceneComponentMSFT.nparentId(address(), value); return this; } - /** Passes the {@code parentId} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer parentId(java.util.function.Consumer consumer) { consumer.accept(parentId()); return this; } - /** Sets the specified value to the {@code updateTime} field. */ - public Buffer updateTime(@NativeType("XrTime") long value) { XrSceneComponentMSFT.nupdateTime(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneComponentParentFilterInfoMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneComponentParentFilterInfoMSFT.java deleted file mode 100644 index aa2d1dec..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneComponentParentFilterInfoMSFT.java +++ /dev/null @@ -1,301 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSceneComponentParentFilterInfoMSFT {
- *     XrStructureType type;
- *     void const * next;
- *     {@link XrUuidMSFT XrUuidMSFT} parentId;
- * }
- */ -public class XrSceneComponentParentFilterInfoMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - PARENTID; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(XrUuidMSFT.SIZEOF, XrUuidMSFT.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - PARENTID = layout.offsetof(2); - } - - /** - * Creates a {@code XrSceneComponentParentFilterInfoMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSceneComponentParentFilterInfoMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return a {@link XrUuidMSFT} view of the {@code parentId} field. */ - public XrUuidMSFT parentId() { return nparentId(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrSceneComponentParentFilterInfoMSFT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link MSFTSceneUnderstanding#XR_TYPE_SCENE_COMPONENT_PARENT_FILTER_INFO_MSFT TYPE_SCENE_COMPONENT_PARENT_FILTER_INFO_MSFT} value to the {@code type} field. */ - public XrSceneComponentParentFilterInfoMSFT type$Default() { return type(MSFTSceneUnderstanding.XR_TYPE_SCENE_COMPONENT_PARENT_FILTER_INFO_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public XrSceneComponentParentFilterInfoMSFT next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Copies the specified {@link XrUuidMSFT} to the {@code parentId} field. */ - public XrSceneComponentParentFilterInfoMSFT parentId(XrUuidMSFT value) { nparentId(address(), value); return this; } - /** Passes the {@code parentId} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrSceneComponentParentFilterInfoMSFT parentId(java.util.function.Consumer consumer) { consumer.accept(parentId()); return this; } - - /** Initializes this struct with the specified values. */ - public XrSceneComponentParentFilterInfoMSFT set( - int type, - long next, - XrUuidMSFT parentId - ) { - type(type); - next(next); - parentId(parentId); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSceneComponentParentFilterInfoMSFT set(XrSceneComponentParentFilterInfoMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSceneComponentParentFilterInfoMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSceneComponentParentFilterInfoMSFT malloc() { - return wrap(XrSceneComponentParentFilterInfoMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSceneComponentParentFilterInfoMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSceneComponentParentFilterInfoMSFT calloc() { - return wrap(XrSceneComponentParentFilterInfoMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSceneComponentParentFilterInfoMSFT} instance allocated with {@link BufferUtils}. */ - public static XrSceneComponentParentFilterInfoMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSceneComponentParentFilterInfoMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrSceneComponentParentFilterInfoMSFT} instance for the specified memory address. */ - public static XrSceneComponentParentFilterInfoMSFT create(long address) { - return wrap(XrSceneComponentParentFilterInfoMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSceneComponentParentFilterInfoMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrSceneComponentParentFilterInfoMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSceneComponentParentFilterInfoMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSceneComponentParentFilterInfoMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSceneComponentParentFilterInfoMSFT malloc(MemoryStack stack) { - return wrap(XrSceneComponentParentFilterInfoMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSceneComponentParentFilterInfoMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSceneComponentParentFilterInfoMSFT calloc(MemoryStack stack) { - return wrap(XrSceneComponentParentFilterInfoMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSceneComponentParentFilterInfoMSFT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSceneComponentParentFilterInfoMSFT.NEXT); } - /** Unsafe version of {@link #parentId}. */ - public static XrUuidMSFT nparentId(long struct) { return XrUuidMSFT.create(struct + XrSceneComponentParentFilterInfoMSFT.PARENTID); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSceneComponentParentFilterInfoMSFT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSceneComponentParentFilterInfoMSFT.NEXT, value); } - /** Unsafe version of {@link #parentId(XrUuidMSFT) parentId}. */ - public static void nparentId(long struct, XrUuidMSFT value) { memCopy(value.address(), struct + XrSceneComponentParentFilterInfoMSFT.PARENTID, XrUuidMSFT.SIZEOF); } - - // ----------------------------------- - - /** An array of {@link XrSceneComponentParentFilterInfoMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSceneComponentParentFilterInfoMSFT ELEMENT_FACTORY = XrSceneComponentParentFilterInfoMSFT.create(-1L); - - /** - * Creates a new {@code XrSceneComponentParentFilterInfoMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSceneComponentParentFilterInfoMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSceneComponentParentFilterInfoMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSceneComponentParentFilterInfoMSFT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrSceneComponentParentFilterInfoMSFT.nnext(address()); } - /** @return a {@link XrUuidMSFT} view of the {@code parentId} field. */ - public XrUuidMSFT parentId() { return XrSceneComponentParentFilterInfoMSFT.nparentId(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSceneComponentParentFilterInfoMSFT.ntype(address(), value); return this; } - /** Sets the {@link MSFTSceneUnderstanding#XR_TYPE_SCENE_COMPONENT_PARENT_FILTER_INFO_MSFT TYPE_SCENE_COMPONENT_PARENT_FILTER_INFO_MSFT} value to the {@code type} field. */ - public Buffer type$Default() { return type(MSFTSceneUnderstanding.XR_TYPE_SCENE_COMPONENT_PARENT_FILTER_INFO_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrSceneComponentParentFilterInfoMSFT.nnext(address(), value); return this; } - /** Copies the specified {@link XrUuidMSFT} to the {@code parentId} field. */ - public Buffer parentId(XrUuidMSFT value) { XrSceneComponentParentFilterInfoMSFT.nparentId(address(), value); return this; } - /** Passes the {@code parentId} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer parentId(java.util.function.Consumer consumer) { consumer.accept(parentId()); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneComponentsGetInfoMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneComponentsGetInfoMSFT.java deleted file mode 100644 index 6baf1d86..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneComponentsGetInfoMSFT.java +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSceneComponentsGetInfoMSFT {
- *     XrStructureType type;
- *     void const * next;
- *     XrSceneComponentTypeMSFT componentType;
- * }
- */ -public class XrSceneComponentsGetInfoMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - COMPONENTTYPE; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - COMPONENTTYPE = layout.offsetof(2); - } - - /** - * Creates a {@code XrSceneComponentsGetInfoMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSceneComponentsGetInfoMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code componentType} field. */ - @NativeType("XrSceneComponentTypeMSFT") - public int componentType() { return ncomponentType(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrSceneComponentsGetInfoMSFT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link MSFTSceneUnderstanding#XR_TYPE_SCENE_COMPONENTS_GET_INFO_MSFT TYPE_SCENE_COMPONENTS_GET_INFO_MSFT} value to the {@code type} field. */ - public XrSceneComponentsGetInfoMSFT type$Default() { return type(MSFTSceneUnderstanding.XR_TYPE_SCENE_COMPONENTS_GET_INFO_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public XrSceneComponentsGetInfoMSFT next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code componentType} field. */ - public XrSceneComponentsGetInfoMSFT componentType(@NativeType("XrSceneComponentTypeMSFT") int value) { ncomponentType(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrSceneComponentsGetInfoMSFT set( - int type, - long next, - int componentType - ) { - type(type); - next(next); - componentType(componentType); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSceneComponentsGetInfoMSFT set(XrSceneComponentsGetInfoMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSceneComponentsGetInfoMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSceneComponentsGetInfoMSFT malloc() { - return wrap(XrSceneComponentsGetInfoMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSceneComponentsGetInfoMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSceneComponentsGetInfoMSFT calloc() { - return wrap(XrSceneComponentsGetInfoMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSceneComponentsGetInfoMSFT} instance allocated with {@link BufferUtils}. */ - public static XrSceneComponentsGetInfoMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSceneComponentsGetInfoMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrSceneComponentsGetInfoMSFT} instance for the specified memory address. */ - public static XrSceneComponentsGetInfoMSFT create(long address) { - return wrap(XrSceneComponentsGetInfoMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSceneComponentsGetInfoMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrSceneComponentsGetInfoMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSceneComponentsGetInfoMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSceneComponentsGetInfoMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSceneComponentsGetInfoMSFT malloc(MemoryStack stack) { - return wrap(XrSceneComponentsGetInfoMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSceneComponentsGetInfoMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSceneComponentsGetInfoMSFT calloc(MemoryStack stack) { - return wrap(XrSceneComponentsGetInfoMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSceneComponentsGetInfoMSFT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSceneComponentsGetInfoMSFT.NEXT); } - /** Unsafe version of {@link #componentType}. */ - public static int ncomponentType(long struct) { return UNSAFE.getInt(null, struct + XrSceneComponentsGetInfoMSFT.COMPONENTTYPE); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSceneComponentsGetInfoMSFT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSceneComponentsGetInfoMSFT.NEXT, value); } - /** Unsafe version of {@link #componentType(int) componentType}. */ - public static void ncomponentType(long struct, int value) { UNSAFE.putInt(null, struct + XrSceneComponentsGetInfoMSFT.COMPONENTTYPE, value); } - - // ----------------------------------- - - /** An array of {@link XrSceneComponentsGetInfoMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSceneComponentsGetInfoMSFT ELEMENT_FACTORY = XrSceneComponentsGetInfoMSFT.create(-1L); - - /** - * Creates a new {@code XrSceneComponentsGetInfoMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSceneComponentsGetInfoMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSceneComponentsGetInfoMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSceneComponentsGetInfoMSFT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrSceneComponentsGetInfoMSFT.nnext(address()); } - /** @return the value of the {@code componentType} field. */ - @NativeType("XrSceneComponentTypeMSFT") - public int componentType() { return XrSceneComponentsGetInfoMSFT.ncomponentType(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSceneComponentsGetInfoMSFT.ntype(address(), value); return this; } - /** Sets the {@link MSFTSceneUnderstanding#XR_TYPE_SCENE_COMPONENTS_GET_INFO_MSFT TYPE_SCENE_COMPONENTS_GET_INFO_MSFT} value to the {@code type} field. */ - public Buffer type$Default() { return type(MSFTSceneUnderstanding.XR_TYPE_SCENE_COMPONENTS_GET_INFO_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrSceneComponentsGetInfoMSFT.nnext(address(), value); return this; } - /** Sets the specified value to the {@code componentType} field. */ - public Buffer componentType(@NativeType("XrSceneComponentTypeMSFT") int value) { XrSceneComponentsGetInfoMSFT.ncomponentType(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneComponentsLocateInfoMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneComponentsLocateInfoMSFT.java deleted file mode 100644 index 51f98527..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneComponentsLocateInfoMSFT.java +++ /dev/null @@ -1,383 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSceneComponentsLocateInfoMSFT {
- *     XrStructureType type;
- *     void const * next;
- *     XrSpace baseSpace;
- *     XrTime time;
- *     uint32_t componentIdCount;
- *     {@link XrUuidMSFT XrUuidMSFT} const * componentIds;
- * }
- */ -public class XrSceneComponentsLocateInfoMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - BASESPACE, - TIME, - COMPONENTIDCOUNT, - COMPONENTIDS; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(8), - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - BASESPACE = layout.offsetof(2); - TIME = layout.offsetof(3); - COMPONENTIDCOUNT = layout.offsetof(4); - COMPONENTIDS = layout.offsetof(5); - } - - /** - * Creates a {@code XrSceneComponentsLocateInfoMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSceneComponentsLocateInfoMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code baseSpace} field. */ - @NativeType("XrSpace") - public long baseSpace() { return nbaseSpace(address()); } - /** @return the value of the {@code time} field. */ - @NativeType("XrTime") - public long time() { return ntime(address()); } - /** @return the value of the {@code componentIdCount} field. */ - @NativeType("uint32_t") - public int componentIdCount() { return ncomponentIdCount(address()); } - /** @return a {@link XrUuidMSFT.Buffer} view of the struct array pointed to by the {@code componentIds} field. */ - @Nullable - @NativeType("XrUuidMSFT const *") - public XrUuidMSFT.Buffer componentIds() { return ncomponentIds(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrSceneComponentsLocateInfoMSFT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link MSFTSceneUnderstanding#XR_TYPE_SCENE_COMPONENTS_LOCATE_INFO_MSFT TYPE_SCENE_COMPONENTS_LOCATE_INFO_MSFT} value to the {@code type} field. */ - public XrSceneComponentsLocateInfoMSFT type$Default() { return type(MSFTSceneUnderstanding.XR_TYPE_SCENE_COMPONENTS_LOCATE_INFO_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public XrSceneComponentsLocateInfoMSFT next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code baseSpace} field. */ - public XrSceneComponentsLocateInfoMSFT baseSpace(XrSpace value) { nbaseSpace(address(), value); return this; } - /** Sets the specified value to the {@code time} field. */ - public XrSceneComponentsLocateInfoMSFT time(@NativeType("XrTime") long value) { ntime(address(), value); return this; } - /** Sets the specified value to the {@code componentIdCount} field. */ - public XrSceneComponentsLocateInfoMSFT componentIdCount(@NativeType("uint32_t") int value) { ncomponentIdCount(address(), value); return this; } - /** Sets the address of the specified {@link XrUuidMSFT.Buffer} to the {@code componentIds} field. */ - public XrSceneComponentsLocateInfoMSFT componentIds(@Nullable @NativeType("XrUuidMSFT const *") XrUuidMSFT.Buffer value) { ncomponentIds(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrSceneComponentsLocateInfoMSFT set( - int type, - long next, - XrSpace baseSpace, - long time, - int componentIdCount, - @Nullable XrUuidMSFT.Buffer componentIds - ) { - type(type); - next(next); - baseSpace(baseSpace); - time(time); - componentIdCount(componentIdCount); - componentIds(componentIds); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSceneComponentsLocateInfoMSFT set(XrSceneComponentsLocateInfoMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSceneComponentsLocateInfoMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSceneComponentsLocateInfoMSFT malloc() { - return wrap(XrSceneComponentsLocateInfoMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSceneComponentsLocateInfoMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSceneComponentsLocateInfoMSFT calloc() { - return wrap(XrSceneComponentsLocateInfoMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSceneComponentsLocateInfoMSFT} instance allocated with {@link BufferUtils}. */ - public static XrSceneComponentsLocateInfoMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSceneComponentsLocateInfoMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrSceneComponentsLocateInfoMSFT} instance for the specified memory address. */ - public static XrSceneComponentsLocateInfoMSFT create(long address) { - return wrap(XrSceneComponentsLocateInfoMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSceneComponentsLocateInfoMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrSceneComponentsLocateInfoMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSceneComponentsLocateInfoMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSceneComponentsLocateInfoMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSceneComponentsLocateInfoMSFT malloc(MemoryStack stack) { - return wrap(XrSceneComponentsLocateInfoMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSceneComponentsLocateInfoMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSceneComponentsLocateInfoMSFT calloc(MemoryStack stack) { - return wrap(XrSceneComponentsLocateInfoMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSceneComponentsLocateInfoMSFT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSceneComponentsLocateInfoMSFT.NEXT); } - /** Unsafe version of {@link #baseSpace}. */ - public static long nbaseSpace(long struct) { return memGetAddress(struct + XrSceneComponentsLocateInfoMSFT.BASESPACE); } - /** Unsafe version of {@link #time}. */ - public static long ntime(long struct) { return UNSAFE.getLong(null, struct + XrSceneComponentsLocateInfoMSFT.TIME); } - /** Unsafe version of {@link #componentIdCount}. */ - public static int ncomponentIdCount(long struct) { return UNSAFE.getInt(null, struct + XrSceneComponentsLocateInfoMSFT.COMPONENTIDCOUNT); } - /** Unsafe version of {@link #componentIds}. */ - @Nullable public static XrUuidMSFT.Buffer ncomponentIds(long struct) { return XrUuidMSFT.createSafe(memGetAddress(struct + XrSceneComponentsLocateInfoMSFT.COMPONENTIDS), ncomponentIdCount(struct)); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSceneComponentsLocateInfoMSFT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSceneComponentsLocateInfoMSFT.NEXT, value); } - /** Unsafe version of {@link #baseSpace(XrSpace) baseSpace}. */ - public static void nbaseSpace(long struct, XrSpace value) { memPutAddress(struct + XrSceneComponentsLocateInfoMSFT.BASESPACE, value.address()); } - /** Unsafe version of {@link #time(long) time}. */ - public static void ntime(long struct, long value) { UNSAFE.putLong(null, struct + XrSceneComponentsLocateInfoMSFT.TIME, value); } - /** Sets the specified value to the {@code componentIdCount} field of the specified {@code struct}. */ - public static void ncomponentIdCount(long struct, int value) { UNSAFE.putInt(null, struct + XrSceneComponentsLocateInfoMSFT.COMPONENTIDCOUNT, value); } - /** Unsafe version of {@link #componentIds(XrUuidMSFT.Buffer) componentIds}. */ - public static void ncomponentIds(long struct, @Nullable XrUuidMSFT.Buffer value) { memPutAddress(struct + XrSceneComponentsLocateInfoMSFT.COMPONENTIDS, memAddressSafe(value)); if (value != null) { ncomponentIdCount(struct, value.remaining()); } } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XrSceneComponentsLocateInfoMSFT.BASESPACE)); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrSceneComponentsLocateInfoMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSceneComponentsLocateInfoMSFT ELEMENT_FACTORY = XrSceneComponentsLocateInfoMSFT.create(-1L); - - /** - * Creates a new {@code XrSceneComponentsLocateInfoMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSceneComponentsLocateInfoMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSceneComponentsLocateInfoMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSceneComponentsLocateInfoMSFT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrSceneComponentsLocateInfoMSFT.nnext(address()); } - /** @return the value of the {@code baseSpace} field. */ - @NativeType("XrSpace") - public long baseSpace() { return XrSceneComponentsLocateInfoMSFT.nbaseSpace(address()); } - /** @return the value of the {@code time} field. */ - @NativeType("XrTime") - public long time() { return XrSceneComponentsLocateInfoMSFT.ntime(address()); } - /** @return the value of the {@code componentIdCount} field. */ - @NativeType("uint32_t") - public int componentIdCount() { return XrSceneComponentsLocateInfoMSFT.ncomponentIdCount(address()); } - /** @return a {@link XrUuidMSFT.Buffer} view of the struct array pointed to by the {@code componentIds} field. */ - @Nullable - @NativeType("XrUuidMSFT const *") - public XrUuidMSFT.Buffer componentIds() { return XrSceneComponentsLocateInfoMSFT.ncomponentIds(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSceneComponentsLocateInfoMSFT.ntype(address(), value); return this; } - /** Sets the {@link MSFTSceneUnderstanding#XR_TYPE_SCENE_COMPONENTS_LOCATE_INFO_MSFT TYPE_SCENE_COMPONENTS_LOCATE_INFO_MSFT} value to the {@code type} field. */ - public Buffer type$Default() { return type(MSFTSceneUnderstanding.XR_TYPE_SCENE_COMPONENTS_LOCATE_INFO_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrSceneComponentsLocateInfoMSFT.nnext(address(), value); return this; } - /** Sets the specified value to the {@code baseSpace} field. */ - public Buffer baseSpace(XrSpace value) { XrSceneComponentsLocateInfoMSFT.nbaseSpace(address(), value); return this; } - /** Sets the specified value to the {@code time} field. */ - public Buffer time(@NativeType("XrTime") long value) { XrSceneComponentsLocateInfoMSFT.ntime(address(), value); return this; } - /** Sets the specified value to the {@code componentIdCount} field. */ - public Buffer componentIdCount(@NativeType("uint32_t") int value) { XrSceneComponentsLocateInfoMSFT.ncomponentIdCount(address(), value); return this; } - /** Sets the address of the specified {@link XrUuidMSFT.Buffer} to the {@code componentIds} field. */ - public Buffer componentIds(@Nullable @NativeType("XrUuidMSFT const *") XrUuidMSFT.Buffer value) { XrSceneComponentsLocateInfoMSFT.ncomponentIds(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneComponentsMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneComponentsMSFT.java deleted file mode 100644 index e33cc1fb..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneComponentsMSFT.java +++ /dev/null @@ -1,341 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSceneComponentsMSFT {
- *     XrStructureType type;
- *     void * next;
- *     uint32_t componentCapacityInput;
- *     uint32_t componentCountOutput;
- *     {@link XrSceneComponentMSFT XrSceneComponentMSFT} * components;
- * }
- */ -public class XrSceneComponentsMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - COMPONENTCAPACITYINPUT, - COMPONENTCOUNTOUTPUT, - COMPONENTS; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - COMPONENTCAPACITYINPUT = layout.offsetof(2); - COMPONENTCOUNTOUTPUT = layout.offsetof(3); - COMPONENTS = layout.offsetof(4); - } - - /** - * Creates a {@code XrSceneComponentsMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSceneComponentsMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return the value of the {@code componentCapacityInput} field. */ - @NativeType("uint32_t") - public int componentCapacityInput() { return ncomponentCapacityInput(address()); } - /** @return the value of the {@code componentCountOutput} field. */ - @NativeType("uint32_t") - public int componentCountOutput() { return ncomponentCountOutput(address()); } - /** @return a {@link XrSceneComponentMSFT.Buffer} view of the struct array pointed to by the {@code components} field. */ - @Nullable - @NativeType("XrSceneComponentMSFT *") - public XrSceneComponentMSFT.Buffer components() { return ncomponents(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrSceneComponentsMSFT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link MSFTSceneUnderstanding#XR_TYPE_SCENE_COMPONENTS_MSFT TYPE_SCENE_COMPONENTS_MSFT} value to the {@code type} field. */ - public XrSceneComponentsMSFT type$Default() { return type(MSFTSceneUnderstanding.XR_TYPE_SCENE_COMPONENTS_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public XrSceneComponentsMSFT next(@NativeType("void *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code componentCapacityInput} field. */ - public XrSceneComponentsMSFT componentCapacityInput(@NativeType("uint32_t") int value) { ncomponentCapacityInput(address(), value); return this; } - /** Sets the specified value to the {@code componentCountOutput} field. */ - public XrSceneComponentsMSFT componentCountOutput(@NativeType("uint32_t") int value) { ncomponentCountOutput(address(), value); return this; } - /** Sets the address of the specified {@link XrSceneComponentMSFT.Buffer} to the {@code components} field. */ - public XrSceneComponentsMSFT components(@Nullable @NativeType("XrSceneComponentMSFT *") XrSceneComponentMSFT.Buffer value) { ncomponents(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrSceneComponentsMSFT set( - int type, - long next, - int componentCapacityInput, - int componentCountOutput, - @Nullable XrSceneComponentMSFT.Buffer components - ) { - type(type); - next(next); - componentCapacityInput(componentCapacityInput); - componentCountOutput(componentCountOutput); - components(components); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSceneComponentsMSFT set(XrSceneComponentsMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSceneComponentsMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSceneComponentsMSFT malloc() { - return wrap(XrSceneComponentsMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSceneComponentsMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSceneComponentsMSFT calloc() { - return wrap(XrSceneComponentsMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSceneComponentsMSFT} instance allocated with {@link BufferUtils}. */ - public static XrSceneComponentsMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSceneComponentsMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrSceneComponentsMSFT} instance for the specified memory address. */ - public static XrSceneComponentsMSFT create(long address) { - return wrap(XrSceneComponentsMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSceneComponentsMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrSceneComponentsMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSceneComponentsMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSceneComponentsMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSceneComponentsMSFT malloc(MemoryStack stack) { - return wrap(XrSceneComponentsMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSceneComponentsMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSceneComponentsMSFT calloc(MemoryStack stack) { - return wrap(XrSceneComponentsMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSceneComponentsMSFT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSceneComponentsMSFT.NEXT); } - /** Unsafe version of {@link #componentCapacityInput}. */ - public static int ncomponentCapacityInput(long struct) { return UNSAFE.getInt(null, struct + XrSceneComponentsMSFT.COMPONENTCAPACITYINPUT); } - /** Unsafe version of {@link #componentCountOutput}. */ - public static int ncomponentCountOutput(long struct) { return UNSAFE.getInt(null, struct + XrSceneComponentsMSFT.COMPONENTCOUNTOUTPUT); } - /** Unsafe version of {@link #components}. */ - @Nullable public static XrSceneComponentMSFT.Buffer ncomponents(long struct) { return XrSceneComponentMSFT.createSafe(memGetAddress(struct + XrSceneComponentsMSFT.COMPONENTS), ncomponentCapacityInput(struct)); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSceneComponentsMSFT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSceneComponentsMSFT.NEXT, value); } - /** Sets the specified value to the {@code componentCapacityInput} field of the specified {@code struct}. */ - public static void ncomponentCapacityInput(long struct, int value) { UNSAFE.putInt(null, struct + XrSceneComponentsMSFT.COMPONENTCAPACITYINPUT, value); } - /** Unsafe version of {@link #componentCountOutput(int) componentCountOutput}. */ - public static void ncomponentCountOutput(long struct, int value) { UNSAFE.putInt(null, struct + XrSceneComponentsMSFT.COMPONENTCOUNTOUTPUT, value); } - /** Unsafe version of {@link #components(XrSceneComponentMSFT.Buffer) components}. */ - public static void ncomponents(long struct, @Nullable XrSceneComponentMSFT.Buffer value) { memPutAddress(struct + XrSceneComponentsMSFT.COMPONENTS, memAddressSafe(value)); if (value != null) { ncomponentCapacityInput(struct, value.remaining()); } } - - // ----------------------------------- - - /** An array of {@link XrSceneComponentsMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSceneComponentsMSFT ELEMENT_FACTORY = XrSceneComponentsMSFT.create(-1L); - - /** - * Creates a new {@code XrSceneComponentsMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSceneComponentsMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSceneComponentsMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSceneComponentsMSFT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrSceneComponentsMSFT.nnext(address()); } - /** @return the value of the {@code componentCapacityInput} field. */ - @NativeType("uint32_t") - public int componentCapacityInput() { return XrSceneComponentsMSFT.ncomponentCapacityInput(address()); } - /** @return the value of the {@code componentCountOutput} field. */ - @NativeType("uint32_t") - public int componentCountOutput() { return XrSceneComponentsMSFT.ncomponentCountOutput(address()); } - /** @return a {@link XrSceneComponentMSFT.Buffer} view of the struct array pointed to by the {@code components} field. */ - @Nullable - @NativeType("XrSceneComponentMSFT *") - public XrSceneComponentMSFT.Buffer components() { return XrSceneComponentsMSFT.ncomponents(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSceneComponentsMSFT.ntype(address(), value); return this; } - /** Sets the {@link MSFTSceneUnderstanding#XR_TYPE_SCENE_COMPONENTS_MSFT TYPE_SCENE_COMPONENTS_MSFT} value to the {@code type} field. */ - public Buffer type$Default() { return type(MSFTSceneUnderstanding.XR_TYPE_SCENE_COMPONENTS_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrSceneComponentsMSFT.nnext(address(), value); return this; } - /** Sets the specified value to the {@code componentCapacityInput} field. */ - public Buffer componentCapacityInput(@NativeType("uint32_t") int value) { XrSceneComponentsMSFT.ncomponentCapacityInput(address(), value); return this; } - /** Sets the specified value to the {@code componentCountOutput} field. */ - public Buffer componentCountOutput(@NativeType("uint32_t") int value) { XrSceneComponentsMSFT.ncomponentCountOutput(address(), value); return this; } - /** Sets the address of the specified {@link XrSceneComponentMSFT.Buffer} to the {@code components} field. */ - public Buffer components(@Nullable @NativeType("XrSceneComponentMSFT *") XrSceneComponentMSFT.Buffer value) { XrSceneComponentsMSFT.ncomponents(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneCreateInfoMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneCreateInfoMSFT.java deleted file mode 100644 index 751b839d..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneCreateInfoMSFT.java +++ /dev/null @@ -1,279 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSceneCreateInfoMSFT {
- *     XrStructureType type;
- *     void const * next;
- * }
- */ -public class XrSceneCreateInfoMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - } - - /** - * Creates a {@code XrSceneCreateInfoMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSceneCreateInfoMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrSceneCreateInfoMSFT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link MSFTSceneUnderstanding#XR_TYPE_SCENE_CREATE_INFO_MSFT TYPE_SCENE_CREATE_INFO_MSFT} value to the {@code type} field. */ - public XrSceneCreateInfoMSFT type$Default() { return type(MSFTSceneUnderstanding.XR_TYPE_SCENE_CREATE_INFO_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public XrSceneCreateInfoMSFT next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrSceneCreateInfoMSFT set( - int type, - long next - ) { - type(type); - next(next); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSceneCreateInfoMSFT set(XrSceneCreateInfoMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSceneCreateInfoMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSceneCreateInfoMSFT malloc() { - return wrap(XrSceneCreateInfoMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSceneCreateInfoMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSceneCreateInfoMSFT calloc() { - return wrap(XrSceneCreateInfoMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSceneCreateInfoMSFT} instance allocated with {@link BufferUtils}. */ - public static XrSceneCreateInfoMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSceneCreateInfoMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrSceneCreateInfoMSFT} instance for the specified memory address. */ - public static XrSceneCreateInfoMSFT create(long address) { - return wrap(XrSceneCreateInfoMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSceneCreateInfoMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrSceneCreateInfoMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSceneCreateInfoMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSceneCreateInfoMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSceneCreateInfoMSFT malloc(MemoryStack stack) { - return wrap(XrSceneCreateInfoMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSceneCreateInfoMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSceneCreateInfoMSFT calloc(MemoryStack stack) { - return wrap(XrSceneCreateInfoMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSceneCreateInfoMSFT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSceneCreateInfoMSFT.NEXT); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSceneCreateInfoMSFT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSceneCreateInfoMSFT.NEXT, value); } - - // ----------------------------------- - - /** An array of {@link XrSceneCreateInfoMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSceneCreateInfoMSFT ELEMENT_FACTORY = XrSceneCreateInfoMSFT.create(-1L); - - /** - * Creates a new {@code XrSceneCreateInfoMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSceneCreateInfoMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSceneCreateInfoMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSceneCreateInfoMSFT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrSceneCreateInfoMSFT.nnext(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSceneCreateInfoMSFT.ntype(address(), value); return this; } - /** Sets the {@link MSFTSceneUnderstanding#XR_TYPE_SCENE_CREATE_INFO_MSFT TYPE_SCENE_CREATE_INFO_MSFT} value to the {@code type} field. */ - public Buffer type$Default() { return type(MSFTSceneUnderstanding.XR_TYPE_SCENE_CREATE_INFO_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrSceneCreateInfoMSFT.nnext(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneDeserializeInfoMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneDeserializeInfoMSFT.java deleted file mode 100644 index cf21ae45..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneDeserializeInfoMSFT.java +++ /dev/null @@ -1,321 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSceneDeserializeInfoMSFT {
- *     XrStructureType type;
- *     void const * next;
- *     uint32_t fragmentCount;
- *     {@link XrDeserializeSceneFragmentMSFT XrDeserializeSceneFragmentMSFT} const * fragments;
- * }
- */ -public class XrSceneDeserializeInfoMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - FRAGMENTCOUNT, - FRAGMENTS; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - FRAGMENTCOUNT = layout.offsetof(2); - FRAGMENTS = layout.offsetof(3); - } - - /** - * Creates a {@code XrSceneDeserializeInfoMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSceneDeserializeInfoMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code fragmentCount} field. */ - @NativeType("uint32_t") - public int fragmentCount() { return nfragmentCount(address()); } - /** @return a {@link XrDeserializeSceneFragmentMSFT.Buffer} view of the struct array pointed to by the {@code fragments} field. */ - @Nullable - @NativeType("XrDeserializeSceneFragmentMSFT const *") - public XrDeserializeSceneFragmentMSFT.Buffer fragments() { return nfragments(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrSceneDeserializeInfoMSFT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link MSFTSceneUnderstandingSerialization#XR_TYPE_SCENE_DESERIALIZE_INFO_MSFT TYPE_SCENE_DESERIALIZE_INFO_MSFT} value to the {@code type} field. */ - public XrSceneDeserializeInfoMSFT type$Default() { return type(MSFTSceneUnderstandingSerialization.XR_TYPE_SCENE_DESERIALIZE_INFO_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public XrSceneDeserializeInfoMSFT next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code fragmentCount} field. */ - public XrSceneDeserializeInfoMSFT fragmentCount(@NativeType("uint32_t") int value) { nfragmentCount(address(), value); return this; } - /** Sets the address of the specified {@link XrDeserializeSceneFragmentMSFT.Buffer} to the {@code fragments} field. */ - public XrSceneDeserializeInfoMSFT fragments(@Nullable @NativeType("XrDeserializeSceneFragmentMSFT const *") XrDeserializeSceneFragmentMSFT.Buffer value) { nfragments(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrSceneDeserializeInfoMSFT set( - int type, - long next, - int fragmentCount, - @Nullable XrDeserializeSceneFragmentMSFT.Buffer fragments - ) { - type(type); - next(next); - fragmentCount(fragmentCount); - fragments(fragments); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSceneDeserializeInfoMSFT set(XrSceneDeserializeInfoMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSceneDeserializeInfoMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSceneDeserializeInfoMSFT malloc() { - return wrap(XrSceneDeserializeInfoMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSceneDeserializeInfoMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSceneDeserializeInfoMSFT calloc() { - return wrap(XrSceneDeserializeInfoMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSceneDeserializeInfoMSFT} instance allocated with {@link BufferUtils}. */ - public static XrSceneDeserializeInfoMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSceneDeserializeInfoMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrSceneDeserializeInfoMSFT} instance for the specified memory address. */ - public static XrSceneDeserializeInfoMSFT create(long address) { - return wrap(XrSceneDeserializeInfoMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSceneDeserializeInfoMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrSceneDeserializeInfoMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSceneDeserializeInfoMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSceneDeserializeInfoMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSceneDeserializeInfoMSFT malloc(MemoryStack stack) { - return wrap(XrSceneDeserializeInfoMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSceneDeserializeInfoMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSceneDeserializeInfoMSFT calloc(MemoryStack stack) { - return wrap(XrSceneDeserializeInfoMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSceneDeserializeInfoMSFT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSceneDeserializeInfoMSFT.NEXT); } - /** Unsafe version of {@link #fragmentCount}. */ - public static int nfragmentCount(long struct) { return UNSAFE.getInt(null, struct + XrSceneDeserializeInfoMSFT.FRAGMENTCOUNT); } - /** Unsafe version of {@link #fragments}. */ - @Nullable public static XrDeserializeSceneFragmentMSFT.Buffer nfragments(long struct) { return XrDeserializeSceneFragmentMSFT.createSafe(memGetAddress(struct + XrSceneDeserializeInfoMSFT.FRAGMENTS), nfragmentCount(struct)); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSceneDeserializeInfoMSFT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSceneDeserializeInfoMSFT.NEXT, value); } - /** Sets the specified value to the {@code fragmentCount} field of the specified {@code struct}. */ - public static void nfragmentCount(long struct, int value) { UNSAFE.putInt(null, struct + XrSceneDeserializeInfoMSFT.FRAGMENTCOUNT, value); } - /** Unsafe version of {@link #fragments(XrDeserializeSceneFragmentMSFT.Buffer) fragments}. */ - public static void nfragments(long struct, @Nullable XrDeserializeSceneFragmentMSFT.Buffer value) { memPutAddress(struct + XrSceneDeserializeInfoMSFT.FRAGMENTS, memAddressSafe(value)); if (value != null) { nfragmentCount(struct, value.remaining()); } } - - // ----------------------------------- - - /** An array of {@link XrSceneDeserializeInfoMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSceneDeserializeInfoMSFT ELEMENT_FACTORY = XrSceneDeserializeInfoMSFT.create(-1L); - - /** - * Creates a new {@code XrSceneDeserializeInfoMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSceneDeserializeInfoMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSceneDeserializeInfoMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSceneDeserializeInfoMSFT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrSceneDeserializeInfoMSFT.nnext(address()); } - /** @return the value of the {@code fragmentCount} field. */ - @NativeType("uint32_t") - public int fragmentCount() { return XrSceneDeserializeInfoMSFT.nfragmentCount(address()); } - /** @return a {@link XrDeserializeSceneFragmentMSFT.Buffer} view of the struct array pointed to by the {@code fragments} field. */ - @Nullable - @NativeType("XrDeserializeSceneFragmentMSFT const *") - public XrDeserializeSceneFragmentMSFT.Buffer fragments() { return XrSceneDeserializeInfoMSFT.nfragments(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSceneDeserializeInfoMSFT.ntype(address(), value); return this; } - /** Sets the {@link MSFTSceneUnderstandingSerialization#XR_TYPE_SCENE_DESERIALIZE_INFO_MSFT TYPE_SCENE_DESERIALIZE_INFO_MSFT} value to the {@code type} field. */ - public Buffer type$Default() { return type(MSFTSceneUnderstandingSerialization.XR_TYPE_SCENE_DESERIALIZE_INFO_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrSceneDeserializeInfoMSFT.nnext(address(), value); return this; } - /** Sets the specified value to the {@code fragmentCount} field. */ - public Buffer fragmentCount(@NativeType("uint32_t") int value) { XrSceneDeserializeInfoMSFT.nfragmentCount(address(), value); return this; } - /** Sets the address of the specified {@link XrDeserializeSceneFragmentMSFT.Buffer} to the {@code fragments} field. */ - public Buffer fragments(@Nullable @NativeType("XrDeserializeSceneFragmentMSFT const *") XrDeserializeSceneFragmentMSFT.Buffer value) { XrSceneDeserializeInfoMSFT.nfragments(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneFrustumBoundMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneFrustumBoundMSFT.java deleted file mode 100644 index d0659de1..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneFrustumBoundMSFT.java +++ /dev/null @@ -1,297 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSceneFrustumBoundMSFT {
- *     {@link XrPosef XrPosef} pose;
- *     {@link XrFovf XrFovf} fov;
- *     float farDistance;
- * }
- */ -public class XrSceneFrustumBoundMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - POSE, - FOV, - FARDISTANCE; - - static { - Layout layout = __struct( - __member(XrPosef.SIZEOF, XrPosef.ALIGNOF), - __member(XrFovf.SIZEOF, XrFovf.ALIGNOF), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - POSE = layout.offsetof(0); - FOV = layout.offsetof(1); - FARDISTANCE = layout.offsetof(2); - } - - /** - * Creates a {@code XrSceneFrustumBoundMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSceneFrustumBoundMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return a {@link XrPosef} view of the {@code pose} field. */ - public XrPosef pose() { return npose(address()); } - /** @return a {@link XrFovf} view of the {@code fov} field. */ - public XrFovf fov() { return nfov(address()); } - /** @return the value of the {@code farDistance} field. */ - public float farDistance() { return nfarDistance(address()); } - - /** Copies the specified {@link XrPosef} to the {@code pose} field. */ - public XrSceneFrustumBoundMSFT pose(XrPosef value) { npose(address(), value); return this; } - /** Passes the {@code pose} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrSceneFrustumBoundMSFT pose(java.util.function.Consumer consumer) { consumer.accept(pose()); return this; } - /** Copies the specified {@link XrFovf} to the {@code fov} field. */ - public XrSceneFrustumBoundMSFT fov(XrFovf value) { nfov(address(), value); return this; } - /** Passes the {@code fov} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrSceneFrustumBoundMSFT fov(java.util.function.Consumer consumer) { consumer.accept(fov()); return this; } - /** Sets the specified value to the {@code farDistance} field. */ - public XrSceneFrustumBoundMSFT farDistance(float value) { nfarDistance(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrSceneFrustumBoundMSFT set( - XrPosef pose, - XrFovf fov, - float farDistance - ) { - pose(pose); - fov(fov); - farDistance(farDistance); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSceneFrustumBoundMSFT set(XrSceneFrustumBoundMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSceneFrustumBoundMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSceneFrustumBoundMSFT malloc() { - return wrap(XrSceneFrustumBoundMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSceneFrustumBoundMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSceneFrustumBoundMSFT calloc() { - return wrap(XrSceneFrustumBoundMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSceneFrustumBoundMSFT} instance allocated with {@link BufferUtils}. */ - public static XrSceneFrustumBoundMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSceneFrustumBoundMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrSceneFrustumBoundMSFT} instance for the specified memory address. */ - public static XrSceneFrustumBoundMSFT create(long address) { - return wrap(XrSceneFrustumBoundMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSceneFrustumBoundMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrSceneFrustumBoundMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSceneFrustumBoundMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSceneFrustumBoundMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSceneFrustumBoundMSFT malloc(MemoryStack stack) { - return wrap(XrSceneFrustumBoundMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSceneFrustumBoundMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSceneFrustumBoundMSFT calloc(MemoryStack stack) { - return wrap(XrSceneFrustumBoundMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #pose}. */ - public static XrPosef npose(long struct) { return XrPosef.create(struct + XrSceneFrustumBoundMSFT.POSE); } - /** Unsafe version of {@link #fov}. */ - public static XrFovf nfov(long struct) { return XrFovf.create(struct + XrSceneFrustumBoundMSFT.FOV); } - /** Unsafe version of {@link #farDistance}. */ - public static float nfarDistance(long struct) { return UNSAFE.getFloat(null, struct + XrSceneFrustumBoundMSFT.FARDISTANCE); } - - /** Unsafe version of {@link #pose(XrPosef) pose}. */ - public static void npose(long struct, XrPosef value) { memCopy(value.address(), struct + XrSceneFrustumBoundMSFT.POSE, XrPosef.SIZEOF); } - /** Unsafe version of {@link #fov(XrFovf) fov}. */ - public static void nfov(long struct, XrFovf value) { memCopy(value.address(), struct + XrSceneFrustumBoundMSFT.FOV, XrFovf.SIZEOF); } - /** Unsafe version of {@link #farDistance(float) farDistance}. */ - public static void nfarDistance(long struct, float value) { UNSAFE.putFloat(null, struct + XrSceneFrustumBoundMSFT.FARDISTANCE, value); } - - // ----------------------------------- - - /** An array of {@link XrSceneFrustumBoundMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSceneFrustumBoundMSFT ELEMENT_FACTORY = XrSceneFrustumBoundMSFT.create(-1L); - - /** - * Creates a new {@code XrSceneFrustumBoundMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSceneFrustumBoundMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSceneFrustumBoundMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link XrPosef} view of the {@code pose} field. */ - public XrPosef pose() { return XrSceneFrustumBoundMSFT.npose(address()); } - /** @return a {@link XrFovf} view of the {@code fov} field. */ - public XrFovf fov() { return XrSceneFrustumBoundMSFT.nfov(address()); } - /** @return the value of the {@code farDistance} field. */ - public float farDistance() { return XrSceneFrustumBoundMSFT.nfarDistance(address()); } - - /** Copies the specified {@link XrPosef} to the {@code pose} field. */ - public Buffer pose(XrPosef value) { XrSceneFrustumBoundMSFT.npose(address(), value); return this; } - /** Passes the {@code pose} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer pose(java.util.function.Consumer consumer) { consumer.accept(pose()); return this; } - /** Copies the specified {@link XrFovf} to the {@code fov} field. */ - public Buffer fov(XrFovf value) { XrSceneFrustumBoundMSFT.nfov(address(), value); return this; } - /** Passes the {@code fov} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer fov(java.util.function.Consumer consumer) { consumer.accept(fov()); return this; } - /** Sets the specified value to the {@code farDistance} field. */ - public Buffer farDistance(float value) { XrSceneFrustumBoundMSFT.nfarDistance(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneMSFT.java deleted file mode 100644 index 28d9d44e..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneMSFT.java +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.openxr; - -public class XrSceneMSFT extends DispatchableHandle { - public XrSceneMSFT(long handle, DispatchableHandle session) { - super(handle, session.getCapabilities()); - } - - public XrSceneMSFT(long handle, XRCapabilities capabilities) { - super(handle, capabilities); - } -} diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneMeshBuffersGetInfoMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneMeshBuffersGetInfoMSFT.java deleted file mode 100644 index 8bacb513..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneMeshBuffersGetInfoMSFT.java +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSceneMeshBuffersGetInfoMSFT {
- *     XrStructureType type;
- *     void const * next;
- *     uint64_t meshBufferId;
- * }
- */ -public class XrSceneMeshBuffersGetInfoMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - MESHBUFFERID; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(8) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - MESHBUFFERID = layout.offsetof(2); - } - - /** - * Creates a {@code XrSceneMeshBuffersGetInfoMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSceneMeshBuffersGetInfoMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code meshBufferId} field. */ - @NativeType("uint64_t") - public long meshBufferId() { return nmeshBufferId(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrSceneMeshBuffersGetInfoMSFT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link MSFTSceneUnderstanding#XR_TYPE_SCENE_MESH_BUFFERS_GET_INFO_MSFT TYPE_SCENE_MESH_BUFFERS_GET_INFO_MSFT} value to the {@code type} field. */ - public XrSceneMeshBuffersGetInfoMSFT type$Default() { return type(MSFTSceneUnderstanding.XR_TYPE_SCENE_MESH_BUFFERS_GET_INFO_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public XrSceneMeshBuffersGetInfoMSFT next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code meshBufferId} field. */ - public XrSceneMeshBuffersGetInfoMSFT meshBufferId(@NativeType("uint64_t") long value) { nmeshBufferId(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrSceneMeshBuffersGetInfoMSFT set( - int type, - long next, - long meshBufferId - ) { - type(type); - next(next); - meshBufferId(meshBufferId); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSceneMeshBuffersGetInfoMSFT set(XrSceneMeshBuffersGetInfoMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSceneMeshBuffersGetInfoMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSceneMeshBuffersGetInfoMSFT malloc() { - return wrap(XrSceneMeshBuffersGetInfoMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSceneMeshBuffersGetInfoMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSceneMeshBuffersGetInfoMSFT calloc() { - return wrap(XrSceneMeshBuffersGetInfoMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSceneMeshBuffersGetInfoMSFT} instance allocated with {@link BufferUtils}. */ - public static XrSceneMeshBuffersGetInfoMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSceneMeshBuffersGetInfoMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrSceneMeshBuffersGetInfoMSFT} instance for the specified memory address. */ - public static XrSceneMeshBuffersGetInfoMSFT create(long address) { - return wrap(XrSceneMeshBuffersGetInfoMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSceneMeshBuffersGetInfoMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrSceneMeshBuffersGetInfoMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSceneMeshBuffersGetInfoMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSceneMeshBuffersGetInfoMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSceneMeshBuffersGetInfoMSFT malloc(MemoryStack stack) { - return wrap(XrSceneMeshBuffersGetInfoMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSceneMeshBuffersGetInfoMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSceneMeshBuffersGetInfoMSFT calloc(MemoryStack stack) { - return wrap(XrSceneMeshBuffersGetInfoMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSceneMeshBuffersGetInfoMSFT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSceneMeshBuffersGetInfoMSFT.NEXT); } - /** Unsafe version of {@link #meshBufferId}. */ - public static long nmeshBufferId(long struct) { return UNSAFE.getLong(null, struct + XrSceneMeshBuffersGetInfoMSFT.MESHBUFFERID); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSceneMeshBuffersGetInfoMSFT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSceneMeshBuffersGetInfoMSFT.NEXT, value); } - /** Unsafe version of {@link #meshBufferId(long) meshBufferId}. */ - public static void nmeshBufferId(long struct, long value) { UNSAFE.putLong(null, struct + XrSceneMeshBuffersGetInfoMSFT.MESHBUFFERID, value); } - - // ----------------------------------- - - /** An array of {@link XrSceneMeshBuffersGetInfoMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSceneMeshBuffersGetInfoMSFT ELEMENT_FACTORY = XrSceneMeshBuffersGetInfoMSFT.create(-1L); - - /** - * Creates a new {@code XrSceneMeshBuffersGetInfoMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSceneMeshBuffersGetInfoMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSceneMeshBuffersGetInfoMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSceneMeshBuffersGetInfoMSFT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrSceneMeshBuffersGetInfoMSFT.nnext(address()); } - /** @return the value of the {@code meshBufferId} field. */ - @NativeType("uint64_t") - public long meshBufferId() { return XrSceneMeshBuffersGetInfoMSFT.nmeshBufferId(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSceneMeshBuffersGetInfoMSFT.ntype(address(), value); return this; } - /** Sets the {@link MSFTSceneUnderstanding#XR_TYPE_SCENE_MESH_BUFFERS_GET_INFO_MSFT TYPE_SCENE_MESH_BUFFERS_GET_INFO_MSFT} value to the {@code type} field. */ - public Buffer type$Default() { return type(MSFTSceneUnderstanding.XR_TYPE_SCENE_MESH_BUFFERS_GET_INFO_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrSceneMeshBuffersGetInfoMSFT.nnext(address(), value); return this; } - /** Sets the specified value to the {@code meshBufferId} field. */ - public Buffer meshBufferId(@NativeType("uint64_t") long value) { XrSceneMeshBuffersGetInfoMSFT.nmeshBufferId(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneMeshBuffersMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneMeshBuffersMSFT.java deleted file mode 100644 index ea23f431..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneMeshBuffersMSFT.java +++ /dev/null @@ -1,279 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSceneMeshBuffersMSFT {
- *     XrStructureType type;
- *     void * next;
- * }
- */ -public class XrSceneMeshBuffersMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - } - - /** - * Creates a {@code XrSceneMeshBuffersMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSceneMeshBuffersMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrSceneMeshBuffersMSFT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link MSFTSceneUnderstanding#XR_TYPE_SCENE_MESH_BUFFERS_MSFT TYPE_SCENE_MESH_BUFFERS_MSFT} value to the {@code type} field. */ - public XrSceneMeshBuffersMSFT type$Default() { return type(MSFTSceneUnderstanding.XR_TYPE_SCENE_MESH_BUFFERS_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public XrSceneMeshBuffersMSFT next(@NativeType("void *") long value) { nnext(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrSceneMeshBuffersMSFT set( - int type, - long next - ) { - type(type); - next(next); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSceneMeshBuffersMSFT set(XrSceneMeshBuffersMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSceneMeshBuffersMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSceneMeshBuffersMSFT malloc() { - return wrap(XrSceneMeshBuffersMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSceneMeshBuffersMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSceneMeshBuffersMSFT calloc() { - return wrap(XrSceneMeshBuffersMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSceneMeshBuffersMSFT} instance allocated with {@link BufferUtils}. */ - public static XrSceneMeshBuffersMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSceneMeshBuffersMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrSceneMeshBuffersMSFT} instance for the specified memory address. */ - public static XrSceneMeshBuffersMSFT create(long address) { - return wrap(XrSceneMeshBuffersMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSceneMeshBuffersMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrSceneMeshBuffersMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSceneMeshBuffersMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSceneMeshBuffersMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSceneMeshBuffersMSFT malloc(MemoryStack stack) { - return wrap(XrSceneMeshBuffersMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSceneMeshBuffersMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSceneMeshBuffersMSFT calloc(MemoryStack stack) { - return wrap(XrSceneMeshBuffersMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSceneMeshBuffersMSFT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSceneMeshBuffersMSFT.NEXT); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSceneMeshBuffersMSFT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSceneMeshBuffersMSFT.NEXT, value); } - - // ----------------------------------- - - /** An array of {@link XrSceneMeshBuffersMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSceneMeshBuffersMSFT ELEMENT_FACTORY = XrSceneMeshBuffersMSFT.create(-1L); - - /** - * Creates a new {@code XrSceneMeshBuffersMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSceneMeshBuffersMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSceneMeshBuffersMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSceneMeshBuffersMSFT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrSceneMeshBuffersMSFT.nnext(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSceneMeshBuffersMSFT.ntype(address(), value); return this; } - /** Sets the {@link MSFTSceneUnderstanding#XR_TYPE_SCENE_MESH_BUFFERS_MSFT TYPE_SCENE_MESH_BUFFERS_MSFT} value to the {@code type} field. */ - public Buffer type$Default() { return type(MSFTSceneUnderstanding.XR_TYPE_SCENE_MESH_BUFFERS_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrSceneMeshBuffersMSFT.nnext(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneMeshIndicesUint16MSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneMeshIndicesUint16MSFT.java deleted file mode 100644 index 50f5f150..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneMeshIndicesUint16MSFT.java +++ /dev/null @@ -1,342 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; -import java.nio.ShortBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSceneMeshIndicesUint16MSFT {
- *     XrStructureType type;
- *     void * next;
- *     uint32_t indexCapacityInput;
- *     uint32_t indexCountOutput;
- *     uint16_t * indices;
- * }
- */ -public class XrSceneMeshIndicesUint16MSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - INDEXCAPACITYINPUT, - INDEXCOUNTOUTPUT, - INDICES; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - INDEXCAPACITYINPUT = layout.offsetof(2); - INDEXCOUNTOUTPUT = layout.offsetof(3); - INDICES = layout.offsetof(4); - } - - /** - * Creates a {@code XrSceneMeshIndicesUint16MSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSceneMeshIndicesUint16MSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return the value of the {@code indexCapacityInput} field. */ - @NativeType("uint32_t") - public int indexCapacityInput() { return nindexCapacityInput(address()); } - /** @return the value of the {@code indexCountOutput} field. */ - @NativeType("uint32_t") - public int indexCountOutput() { return nindexCountOutput(address()); } - /** @return a {@link ShortBuffer} view of the data pointed to by the {@code indices} field. */ - @Nullable - @NativeType("uint16_t *") - public ShortBuffer indices() { return nindices(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrSceneMeshIndicesUint16MSFT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link MSFTSceneUnderstanding#XR_TYPE_SCENE_MESH_INDICES_UINT16_MSFT TYPE_SCENE_MESH_INDICES_UINT16_MSFT} value to the {@code type} field. */ - public XrSceneMeshIndicesUint16MSFT type$Default() { return type(MSFTSceneUnderstanding.XR_TYPE_SCENE_MESH_INDICES_UINT16_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public XrSceneMeshIndicesUint16MSFT next(@NativeType("void *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code indexCapacityInput} field. */ - public XrSceneMeshIndicesUint16MSFT indexCapacityInput(@NativeType("uint32_t") int value) { nindexCapacityInput(address(), value); return this; } - /** Sets the specified value to the {@code indexCountOutput} field. */ - public XrSceneMeshIndicesUint16MSFT indexCountOutput(@NativeType("uint32_t") int value) { nindexCountOutput(address(), value); return this; } - /** Sets the address of the specified {@link ShortBuffer} to the {@code indices} field. */ - public XrSceneMeshIndicesUint16MSFT indices(@Nullable @NativeType("uint16_t *") ShortBuffer value) { nindices(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrSceneMeshIndicesUint16MSFT set( - int type, - long next, - int indexCapacityInput, - int indexCountOutput, - @Nullable ShortBuffer indices - ) { - type(type); - next(next); - indexCapacityInput(indexCapacityInput); - indexCountOutput(indexCountOutput); - indices(indices); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSceneMeshIndicesUint16MSFT set(XrSceneMeshIndicesUint16MSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSceneMeshIndicesUint16MSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSceneMeshIndicesUint16MSFT malloc() { - return wrap(XrSceneMeshIndicesUint16MSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSceneMeshIndicesUint16MSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSceneMeshIndicesUint16MSFT calloc() { - return wrap(XrSceneMeshIndicesUint16MSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSceneMeshIndicesUint16MSFT} instance allocated with {@link BufferUtils}. */ - public static XrSceneMeshIndicesUint16MSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSceneMeshIndicesUint16MSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrSceneMeshIndicesUint16MSFT} instance for the specified memory address. */ - public static XrSceneMeshIndicesUint16MSFT create(long address) { - return wrap(XrSceneMeshIndicesUint16MSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSceneMeshIndicesUint16MSFT createSafe(long address) { - return address == NULL ? null : wrap(XrSceneMeshIndicesUint16MSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSceneMeshIndicesUint16MSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSceneMeshIndicesUint16MSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSceneMeshIndicesUint16MSFT malloc(MemoryStack stack) { - return wrap(XrSceneMeshIndicesUint16MSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSceneMeshIndicesUint16MSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSceneMeshIndicesUint16MSFT calloc(MemoryStack stack) { - return wrap(XrSceneMeshIndicesUint16MSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSceneMeshIndicesUint16MSFT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSceneMeshIndicesUint16MSFT.NEXT); } - /** Unsafe version of {@link #indexCapacityInput}. */ - public static int nindexCapacityInput(long struct) { return UNSAFE.getInt(null, struct + XrSceneMeshIndicesUint16MSFT.INDEXCAPACITYINPUT); } - /** Unsafe version of {@link #indexCountOutput}. */ - public static int nindexCountOutput(long struct) { return UNSAFE.getInt(null, struct + XrSceneMeshIndicesUint16MSFT.INDEXCOUNTOUTPUT); } - /** Unsafe version of {@link #indices() indices}. */ - @Nullable public static ShortBuffer nindices(long struct) { return memShortBufferSafe(memGetAddress(struct + XrSceneMeshIndicesUint16MSFT.INDICES), nindexCapacityInput(struct)); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSceneMeshIndicesUint16MSFT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSceneMeshIndicesUint16MSFT.NEXT, value); } - /** Sets the specified value to the {@code indexCapacityInput} field of the specified {@code struct}. */ - public static void nindexCapacityInput(long struct, int value) { UNSAFE.putInt(null, struct + XrSceneMeshIndicesUint16MSFT.INDEXCAPACITYINPUT, value); } - /** Unsafe version of {@link #indexCountOutput(int) indexCountOutput}. */ - public static void nindexCountOutput(long struct, int value) { UNSAFE.putInt(null, struct + XrSceneMeshIndicesUint16MSFT.INDEXCOUNTOUTPUT, value); } - /** Unsafe version of {@link #indices(ShortBuffer) indices}. */ - public static void nindices(long struct, @Nullable ShortBuffer value) { memPutAddress(struct + XrSceneMeshIndicesUint16MSFT.INDICES, memAddressSafe(value)); if (value != null) { nindexCapacityInput(struct, value.remaining()); } } - - // ----------------------------------- - - /** An array of {@link XrSceneMeshIndicesUint16MSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSceneMeshIndicesUint16MSFT ELEMENT_FACTORY = XrSceneMeshIndicesUint16MSFT.create(-1L); - - /** - * Creates a new {@code XrSceneMeshIndicesUint16MSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSceneMeshIndicesUint16MSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSceneMeshIndicesUint16MSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSceneMeshIndicesUint16MSFT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrSceneMeshIndicesUint16MSFT.nnext(address()); } - /** @return the value of the {@code indexCapacityInput} field. */ - @NativeType("uint32_t") - public int indexCapacityInput() { return XrSceneMeshIndicesUint16MSFT.nindexCapacityInput(address()); } - /** @return the value of the {@code indexCountOutput} field. */ - @NativeType("uint32_t") - public int indexCountOutput() { return XrSceneMeshIndicesUint16MSFT.nindexCountOutput(address()); } - /** @return a {@link ShortBuffer} view of the data pointed to by the {@code indices} field. */ - @Nullable - @NativeType("uint16_t *") - public ShortBuffer indices() { return XrSceneMeshIndicesUint16MSFT.nindices(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSceneMeshIndicesUint16MSFT.ntype(address(), value); return this; } - /** Sets the {@link MSFTSceneUnderstanding#XR_TYPE_SCENE_MESH_INDICES_UINT16_MSFT TYPE_SCENE_MESH_INDICES_UINT16_MSFT} value to the {@code type} field. */ - public Buffer type$Default() { return type(MSFTSceneUnderstanding.XR_TYPE_SCENE_MESH_INDICES_UINT16_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrSceneMeshIndicesUint16MSFT.nnext(address(), value); return this; } - /** Sets the specified value to the {@code indexCapacityInput} field. */ - public Buffer indexCapacityInput(@NativeType("uint32_t") int value) { XrSceneMeshIndicesUint16MSFT.nindexCapacityInput(address(), value); return this; } - /** Sets the specified value to the {@code indexCountOutput} field. */ - public Buffer indexCountOutput(@NativeType("uint32_t") int value) { XrSceneMeshIndicesUint16MSFT.nindexCountOutput(address(), value); return this; } - /** Sets the address of the specified {@link ShortBuffer} to the {@code indices} field. */ - public Buffer indices(@Nullable @NativeType("uint16_t *") ShortBuffer value) { XrSceneMeshIndicesUint16MSFT.nindices(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneMeshIndicesUint32MSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneMeshIndicesUint32MSFT.java deleted file mode 100644 index 07109389..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneMeshIndicesUint32MSFT.java +++ /dev/null @@ -1,342 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; -import java.nio.IntBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSceneMeshIndicesUint32MSFT {
- *     XrStructureType type;
- *     void * next;
- *     uint32_t indexCapacityInput;
- *     uint32_t indexCountOutput;
- *     uint32_t * indices;
- * }
- */ -public class XrSceneMeshIndicesUint32MSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - INDEXCAPACITYINPUT, - INDEXCOUNTOUTPUT, - INDICES; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - INDEXCAPACITYINPUT = layout.offsetof(2); - INDEXCOUNTOUTPUT = layout.offsetof(3); - INDICES = layout.offsetof(4); - } - - /** - * Creates a {@code XrSceneMeshIndicesUint32MSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSceneMeshIndicesUint32MSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return the value of the {@code indexCapacityInput} field. */ - @NativeType("uint32_t") - public int indexCapacityInput() { return nindexCapacityInput(address()); } - /** @return the value of the {@code indexCountOutput} field. */ - @NativeType("uint32_t") - public int indexCountOutput() { return nindexCountOutput(address()); } - /** @return a {@link IntBuffer} view of the data pointed to by the {@code indices} field. */ - @Nullable - @NativeType("uint32_t *") - public IntBuffer indices() { return nindices(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrSceneMeshIndicesUint32MSFT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link MSFTSceneUnderstanding#XR_TYPE_SCENE_MESH_INDICES_UINT32_MSFT TYPE_SCENE_MESH_INDICES_UINT32_MSFT} value to the {@code type} field. */ - public XrSceneMeshIndicesUint32MSFT type$Default() { return type(MSFTSceneUnderstanding.XR_TYPE_SCENE_MESH_INDICES_UINT32_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public XrSceneMeshIndicesUint32MSFT next(@NativeType("void *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code indexCapacityInput} field. */ - public XrSceneMeshIndicesUint32MSFT indexCapacityInput(@NativeType("uint32_t") int value) { nindexCapacityInput(address(), value); return this; } - /** Sets the specified value to the {@code indexCountOutput} field. */ - public XrSceneMeshIndicesUint32MSFT indexCountOutput(@NativeType("uint32_t") int value) { nindexCountOutput(address(), value); return this; } - /** Sets the address of the specified {@link IntBuffer} to the {@code indices} field. */ - public XrSceneMeshIndicesUint32MSFT indices(@Nullable @NativeType("uint32_t *") IntBuffer value) { nindices(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrSceneMeshIndicesUint32MSFT set( - int type, - long next, - int indexCapacityInput, - int indexCountOutput, - @Nullable IntBuffer indices - ) { - type(type); - next(next); - indexCapacityInput(indexCapacityInput); - indexCountOutput(indexCountOutput); - indices(indices); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSceneMeshIndicesUint32MSFT set(XrSceneMeshIndicesUint32MSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSceneMeshIndicesUint32MSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSceneMeshIndicesUint32MSFT malloc() { - return wrap(XrSceneMeshIndicesUint32MSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSceneMeshIndicesUint32MSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSceneMeshIndicesUint32MSFT calloc() { - return wrap(XrSceneMeshIndicesUint32MSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSceneMeshIndicesUint32MSFT} instance allocated with {@link BufferUtils}. */ - public static XrSceneMeshIndicesUint32MSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSceneMeshIndicesUint32MSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrSceneMeshIndicesUint32MSFT} instance for the specified memory address. */ - public static XrSceneMeshIndicesUint32MSFT create(long address) { - return wrap(XrSceneMeshIndicesUint32MSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSceneMeshIndicesUint32MSFT createSafe(long address) { - return address == NULL ? null : wrap(XrSceneMeshIndicesUint32MSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSceneMeshIndicesUint32MSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSceneMeshIndicesUint32MSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSceneMeshIndicesUint32MSFT malloc(MemoryStack stack) { - return wrap(XrSceneMeshIndicesUint32MSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSceneMeshIndicesUint32MSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSceneMeshIndicesUint32MSFT calloc(MemoryStack stack) { - return wrap(XrSceneMeshIndicesUint32MSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSceneMeshIndicesUint32MSFT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSceneMeshIndicesUint32MSFT.NEXT); } - /** Unsafe version of {@link #indexCapacityInput}. */ - public static int nindexCapacityInput(long struct) { return UNSAFE.getInt(null, struct + XrSceneMeshIndicesUint32MSFT.INDEXCAPACITYINPUT); } - /** Unsafe version of {@link #indexCountOutput}. */ - public static int nindexCountOutput(long struct) { return UNSAFE.getInt(null, struct + XrSceneMeshIndicesUint32MSFT.INDEXCOUNTOUTPUT); } - /** Unsafe version of {@link #indices() indices}. */ - @Nullable public static IntBuffer nindices(long struct) { return memIntBufferSafe(memGetAddress(struct + XrSceneMeshIndicesUint32MSFT.INDICES), nindexCapacityInput(struct)); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSceneMeshIndicesUint32MSFT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSceneMeshIndicesUint32MSFT.NEXT, value); } - /** Sets the specified value to the {@code indexCapacityInput} field of the specified {@code struct}. */ - public static void nindexCapacityInput(long struct, int value) { UNSAFE.putInt(null, struct + XrSceneMeshIndicesUint32MSFT.INDEXCAPACITYINPUT, value); } - /** Unsafe version of {@link #indexCountOutput(int) indexCountOutput}. */ - public static void nindexCountOutput(long struct, int value) { UNSAFE.putInt(null, struct + XrSceneMeshIndicesUint32MSFT.INDEXCOUNTOUTPUT, value); } - /** Unsafe version of {@link #indices(IntBuffer) indices}. */ - public static void nindices(long struct, @Nullable IntBuffer value) { memPutAddress(struct + XrSceneMeshIndicesUint32MSFT.INDICES, memAddressSafe(value)); if (value != null) { nindexCapacityInput(struct, value.remaining()); } } - - // ----------------------------------- - - /** An array of {@link XrSceneMeshIndicesUint32MSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSceneMeshIndicesUint32MSFT ELEMENT_FACTORY = XrSceneMeshIndicesUint32MSFT.create(-1L); - - /** - * Creates a new {@code XrSceneMeshIndicesUint32MSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSceneMeshIndicesUint32MSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSceneMeshIndicesUint32MSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSceneMeshIndicesUint32MSFT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrSceneMeshIndicesUint32MSFT.nnext(address()); } - /** @return the value of the {@code indexCapacityInput} field. */ - @NativeType("uint32_t") - public int indexCapacityInput() { return XrSceneMeshIndicesUint32MSFT.nindexCapacityInput(address()); } - /** @return the value of the {@code indexCountOutput} field. */ - @NativeType("uint32_t") - public int indexCountOutput() { return XrSceneMeshIndicesUint32MSFT.nindexCountOutput(address()); } - /** @return a {@link IntBuffer} view of the data pointed to by the {@code indices} field. */ - @Nullable - @NativeType("uint32_t *") - public IntBuffer indices() { return XrSceneMeshIndicesUint32MSFT.nindices(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSceneMeshIndicesUint32MSFT.ntype(address(), value); return this; } - /** Sets the {@link MSFTSceneUnderstanding#XR_TYPE_SCENE_MESH_INDICES_UINT32_MSFT TYPE_SCENE_MESH_INDICES_UINT32_MSFT} value to the {@code type} field. */ - public Buffer type$Default() { return type(MSFTSceneUnderstanding.XR_TYPE_SCENE_MESH_INDICES_UINT32_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrSceneMeshIndicesUint32MSFT.nnext(address(), value); return this; } - /** Sets the specified value to the {@code indexCapacityInput} field. */ - public Buffer indexCapacityInput(@NativeType("uint32_t") int value) { XrSceneMeshIndicesUint32MSFT.nindexCapacityInput(address(), value); return this; } - /** Sets the specified value to the {@code indexCountOutput} field. */ - public Buffer indexCountOutput(@NativeType("uint32_t") int value) { XrSceneMeshIndicesUint32MSFT.nindexCountOutput(address(), value); return this; } - /** Sets the address of the specified {@link IntBuffer} to the {@code indices} field. */ - public Buffer indices(@Nullable @NativeType("uint32_t *") IntBuffer value) { XrSceneMeshIndicesUint32MSFT.nindices(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneMeshMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneMeshMSFT.java deleted file mode 100644 index e67502f0..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneMeshMSFT.java +++ /dev/null @@ -1,275 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSceneMeshMSFT {
- *     uint64_t meshBufferId;
- *     XrBool32 supportsIndicesUint16;
- * }
- */ -public class XrSceneMeshMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - MESHBUFFERID, - SUPPORTSINDICESUINT16; - - static { - Layout layout = __struct( - __member(8), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - MESHBUFFERID = layout.offsetof(0); - SUPPORTSINDICESUINT16 = layout.offsetof(1); - } - - /** - * Creates a {@code XrSceneMeshMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSceneMeshMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code meshBufferId} field. */ - @NativeType("uint64_t") - public long meshBufferId() { return nmeshBufferId(address()); } - /** @return the value of the {@code supportsIndicesUint16} field. */ - @NativeType("XrBool32") - public boolean supportsIndicesUint16() { return nsupportsIndicesUint16(address()) != 0; } - - /** Sets the specified value to the {@code meshBufferId} field. */ - public XrSceneMeshMSFT meshBufferId(@NativeType("uint64_t") long value) { nmeshBufferId(address(), value); return this; } - /** Sets the specified value to the {@code supportsIndicesUint16} field. */ - public XrSceneMeshMSFT supportsIndicesUint16(@NativeType("XrBool32") boolean value) { nsupportsIndicesUint16(address(), value ? 1 : 0); return this; } - - /** Initializes this struct with the specified values. */ - public XrSceneMeshMSFT set( - long meshBufferId, - boolean supportsIndicesUint16 - ) { - meshBufferId(meshBufferId); - supportsIndicesUint16(supportsIndicesUint16); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSceneMeshMSFT set(XrSceneMeshMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSceneMeshMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSceneMeshMSFT malloc() { - return wrap(XrSceneMeshMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSceneMeshMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSceneMeshMSFT calloc() { - return wrap(XrSceneMeshMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSceneMeshMSFT} instance allocated with {@link BufferUtils}. */ - public static XrSceneMeshMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSceneMeshMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrSceneMeshMSFT} instance for the specified memory address. */ - public static XrSceneMeshMSFT create(long address) { - return wrap(XrSceneMeshMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSceneMeshMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrSceneMeshMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSceneMeshMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSceneMeshMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSceneMeshMSFT malloc(MemoryStack stack) { - return wrap(XrSceneMeshMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSceneMeshMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSceneMeshMSFT calloc(MemoryStack stack) { - return wrap(XrSceneMeshMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #meshBufferId}. */ - public static long nmeshBufferId(long struct) { return UNSAFE.getLong(null, struct + XrSceneMeshMSFT.MESHBUFFERID); } - /** Unsafe version of {@link #supportsIndicesUint16}. */ - public static int nsupportsIndicesUint16(long struct) { return UNSAFE.getInt(null, struct + XrSceneMeshMSFT.SUPPORTSINDICESUINT16); } - - /** Unsafe version of {@link #meshBufferId(long) meshBufferId}. */ - public static void nmeshBufferId(long struct, long value) { UNSAFE.putLong(null, struct + XrSceneMeshMSFT.MESHBUFFERID, value); } - /** Unsafe version of {@link #supportsIndicesUint16(boolean) supportsIndicesUint16}. */ - public static void nsupportsIndicesUint16(long struct, int value) { UNSAFE.putInt(null, struct + XrSceneMeshMSFT.SUPPORTSINDICESUINT16, value); } - - // ----------------------------------- - - /** An array of {@link XrSceneMeshMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSceneMeshMSFT ELEMENT_FACTORY = XrSceneMeshMSFT.create(-1L); - - /** - * Creates a new {@code XrSceneMeshMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSceneMeshMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSceneMeshMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code meshBufferId} field. */ - @NativeType("uint64_t") - public long meshBufferId() { return XrSceneMeshMSFT.nmeshBufferId(address()); } - /** @return the value of the {@code supportsIndicesUint16} field. */ - @NativeType("XrBool32") - public boolean supportsIndicesUint16() { return XrSceneMeshMSFT.nsupportsIndicesUint16(address()) != 0; } - - /** Sets the specified value to the {@code meshBufferId} field. */ - public Buffer meshBufferId(@NativeType("uint64_t") long value) { XrSceneMeshMSFT.nmeshBufferId(address(), value); return this; } - /** Sets the specified value to the {@code supportsIndicesUint16} field. */ - public Buffer supportsIndicesUint16(@NativeType("XrBool32") boolean value) { XrSceneMeshMSFT.nsupportsIndicesUint16(address(), value ? 1 : 0); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneMeshVertexBufferMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneMeshVertexBufferMSFT.java deleted file mode 100644 index 1d1403dd..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneMeshVertexBufferMSFT.java +++ /dev/null @@ -1,341 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSceneMeshVertexBufferMSFT {
- *     XrStructureType type;
- *     void * next;
- *     uint32_t vertexCapacityInput;
- *     uint32_t vertexCountOutput;
- *     {@link XrVector3f XrVector3f} * vertices;
- * }
- */ -public class XrSceneMeshVertexBufferMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - VERTEXCAPACITYINPUT, - VERTEXCOUNTOUTPUT, - VERTICES; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - VERTEXCAPACITYINPUT = layout.offsetof(2); - VERTEXCOUNTOUTPUT = layout.offsetof(3); - VERTICES = layout.offsetof(4); - } - - /** - * Creates a {@code XrSceneMeshVertexBufferMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSceneMeshVertexBufferMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return the value of the {@code vertexCapacityInput} field. */ - @NativeType("uint32_t") - public int vertexCapacityInput() { return nvertexCapacityInput(address()); } - /** @return the value of the {@code vertexCountOutput} field. */ - @NativeType("uint32_t") - public int vertexCountOutput() { return nvertexCountOutput(address()); } - /** @return a {@link XrVector3f.Buffer} view of the struct array pointed to by the {@code vertices} field. */ - @Nullable - @NativeType("XrVector3f *") - public XrVector3f.Buffer vertices() { return nvertices(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrSceneMeshVertexBufferMSFT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link MSFTSceneUnderstanding#XR_TYPE_SCENE_MESH_VERTEX_BUFFER_MSFT TYPE_SCENE_MESH_VERTEX_BUFFER_MSFT} value to the {@code type} field. */ - public XrSceneMeshVertexBufferMSFT type$Default() { return type(MSFTSceneUnderstanding.XR_TYPE_SCENE_MESH_VERTEX_BUFFER_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public XrSceneMeshVertexBufferMSFT next(@NativeType("void *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code vertexCapacityInput} field. */ - public XrSceneMeshVertexBufferMSFT vertexCapacityInput(@NativeType("uint32_t") int value) { nvertexCapacityInput(address(), value); return this; } - /** Sets the specified value to the {@code vertexCountOutput} field. */ - public XrSceneMeshVertexBufferMSFT vertexCountOutput(@NativeType("uint32_t") int value) { nvertexCountOutput(address(), value); return this; } - /** Sets the address of the specified {@link XrVector3f.Buffer} to the {@code vertices} field. */ - public XrSceneMeshVertexBufferMSFT vertices(@Nullable @NativeType("XrVector3f *") XrVector3f.Buffer value) { nvertices(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrSceneMeshVertexBufferMSFT set( - int type, - long next, - int vertexCapacityInput, - int vertexCountOutput, - @Nullable XrVector3f.Buffer vertices - ) { - type(type); - next(next); - vertexCapacityInput(vertexCapacityInput); - vertexCountOutput(vertexCountOutput); - vertices(vertices); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSceneMeshVertexBufferMSFT set(XrSceneMeshVertexBufferMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSceneMeshVertexBufferMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSceneMeshVertexBufferMSFT malloc() { - return wrap(XrSceneMeshVertexBufferMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSceneMeshVertexBufferMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSceneMeshVertexBufferMSFT calloc() { - return wrap(XrSceneMeshVertexBufferMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSceneMeshVertexBufferMSFT} instance allocated with {@link BufferUtils}. */ - public static XrSceneMeshVertexBufferMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSceneMeshVertexBufferMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrSceneMeshVertexBufferMSFT} instance for the specified memory address. */ - public static XrSceneMeshVertexBufferMSFT create(long address) { - return wrap(XrSceneMeshVertexBufferMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSceneMeshVertexBufferMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrSceneMeshVertexBufferMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSceneMeshVertexBufferMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSceneMeshVertexBufferMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSceneMeshVertexBufferMSFT malloc(MemoryStack stack) { - return wrap(XrSceneMeshVertexBufferMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSceneMeshVertexBufferMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSceneMeshVertexBufferMSFT calloc(MemoryStack stack) { - return wrap(XrSceneMeshVertexBufferMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSceneMeshVertexBufferMSFT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSceneMeshVertexBufferMSFT.NEXT); } - /** Unsafe version of {@link #vertexCapacityInput}. */ - public static int nvertexCapacityInput(long struct) { return UNSAFE.getInt(null, struct + XrSceneMeshVertexBufferMSFT.VERTEXCAPACITYINPUT); } - /** Unsafe version of {@link #vertexCountOutput}. */ - public static int nvertexCountOutput(long struct) { return UNSAFE.getInt(null, struct + XrSceneMeshVertexBufferMSFT.VERTEXCOUNTOUTPUT); } - /** Unsafe version of {@link #vertices}. */ - @Nullable public static XrVector3f.Buffer nvertices(long struct) { return XrVector3f.createSafe(memGetAddress(struct + XrSceneMeshVertexBufferMSFT.VERTICES), nvertexCapacityInput(struct)); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSceneMeshVertexBufferMSFT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSceneMeshVertexBufferMSFT.NEXT, value); } - /** Sets the specified value to the {@code vertexCapacityInput} field of the specified {@code struct}. */ - public static void nvertexCapacityInput(long struct, int value) { UNSAFE.putInt(null, struct + XrSceneMeshVertexBufferMSFT.VERTEXCAPACITYINPUT, value); } - /** Unsafe version of {@link #vertexCountOutput(int) vertexCountOutput}. */ - public static void nvertexCountOutput(long struct, int value) { UNSAFE.putInt(null, struct + XrSceneMeshVertexBufferMSFT.VERTEXCOUNTOUTPUT, value); } - /** Unsafe version of {@link #vertices(XrVector3f.Buffer) vertices}. */ - public static void nvertices(long struct, @Nullable XrVector3f.Buffer value) { memPutAddress(struct + XrSceneMeshVertexBufferMSFT.VERTICES, memAddressSafe(value)); if (value != null) { nvertexCapacityInput(struct, value.remaining()); } } - - // ----------------------------------- - - /** An array of {@link XrSceneMeshVertexBufferMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSceneMeshVertexBufferMSFT ELEMENT_FACTORY = XrSceneMeshVertexBufferMSFT.create(-1L); - - /** - * Creates a new {@code XrSceneMeshVertexBufferMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSceneMeshVertexBufferMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSceneMeshVertexBufferMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSceneMeshVertexBufferMSFT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrSceneMeshVertexBufferMSFT.nnext(address()); } - /** @return the value of the {@code vertexCapacityInput} field. */ - @NativeType("uint32_t") - public int vertexCapacityInput() { return XrSceneMeshVertexBufferMSFT.nvertexCapacityInput(address()); } - /** @return the value of the {@code vertexCountOutput} field. */ - @NativeType("uint32_t") - public int vertexCountOutput() { return XrSceneMeshVertexBufferMSFT.nvertexCountOutput(address()); } - /** @return a {@link XrVector3f.Buffer} view of the struct array pointed to by the {@code vertices} field. */ - @Nullable - @NativeType("XrVector3f *") - public XrVector3f.Buffer vertices() { return XrSceneMeshVertexBufferMSFT.nvertices(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSceneMeshVertexBufferMSFT.ntype(address(), value); return this; } - /** Sets the {@link MSFTSceneUnderstanding#XR_TYPE_SCENE_MESH_VERTEX_BUFFER_MSFT TYPE_SCENE_MESH_VERTEX_BUFFER_MSFT} value to the {@code type} field. */ - public Buffer type$Default() { return type(MSFTSceneUnderstanding.XR_TYPE_SCENE_MESH_VERTEX_BUFFER_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrSceneMeshVertexBufferMSFT.nnext(address(), value); return this; } - /** Sets the specified value to the {@code vertexCapacityInput} field. */ - public Buffer vertexCapacityInput(@NativeType("uint32_t") int value) { XrSceneMeshVertexBufferMSFT.nvertexCapacityInput(address(), value); return this; } - /** Sets the specified value to the {@code vertexCountOutput} field. */ - public Buffer vertexCountOutput(@NativeType("uint32_t") int value) { XrSceneMeshVertexBufferMSFT.nvertexCountOutput(address(), value); return this; } - /** Sets the address of the specified {@link XrVector3f.Buffer} to the {@code vertices} field. */ - public Buffer vertices(@Nullable @NativeType("XrVector3f *") XrVector3f.Buffer value) { XrSceneMeshVertexBufferMSFT.nvertices(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneMeshesMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneMeshesMSFT.java deleted file mode 100644 index 4a1052d3..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneMeshesMSFT.java +++ /dev/null @@ -1,321 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSceneMeshesMSFT {
- *     XrStructureType type;
- *     void * next;
- *     uint32_t sceneMeshCount;
- *     {@link XrSceneMeshMSFT XrSceneMeshMSFT} * sceneMeshes;
- * }
- */ -public class XrSceneMeshesMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - SCENEMESHCOUNT, - SCENEMESHES; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - SCENEMESHCOUNT = layout.offsetof(2); - SCENEMESHES = layout.offsetof(3); - } - - /** - * Creates a {@code XrSceneMeshesMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSceneMeshesMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return the value of the {@code sceneMeshCount} field. */ - @NativeType("uint32_t") - public int sceneMeshCount() { return nsceneMeshCount(address()); } - /** @return a {@link XrSceneMeshMSFT.Buffer} view of the struct array pointed to by the {@code sceneMeshes} field. */ - @Nullable - @NativeType("XrSceneMeshMSFT *") - public XrSceneMeshMSFT.Buffer sceneMeshes() { return nsceneMeshes(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrSceneMeshesMSFT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link MSFTSceneUnderstanding#XR_TYPE_SCENE_MESHES_MSFT TYPE_SCENE_MESHES_MSFT} value to the {@code type} field. */ - public XrSceneMeshesMSFT type$Default() { return type(MSFTSceneUnderstanding.XR_TYPE_SCENE_MESHES_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public XrSceneMeshesMSFT next(@NativeType("void *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code sceneMeshCount} field. */ - public XrSceneMeshesMSFT sceneMeshCount(@NativeType("uint32_t") int value) { nsceneMeshCount(address(), value); return this; } - /** Sets the address of the specified {@link XrSceneMeshMSFT.Buffer} to the {@code sceneMeshes} field. */ - public XrSceneMeshesMSFT sceneMeshes(@Nullable @NativeType("XrSceneMeshMSFT *") XrSceneMeshMSFT.Buffer value) { nsceneMeshes(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrSceneMeshesMSFT set( - int type, - long next, - int sceneMeshCount, - @Nullable XrSceneMeshMSFT.Buffer sceneMeshes - ) { - type(type); - next(next); - sceneMeshCount(sceneMeshCount); - sceneMeshes(sceneMeshes); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSceneMeshesMSFT set(XrSceneMeshesMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSceneMeshesMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSceneMeshesMSFT malloc() { - return wrap(XrSceneMeshesMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSceneMeshesMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSceneMeshesMSFT calloc() { - return wrap(XrSceneMeshesMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSceneMeshesMSFT} instance allocated with {@link BufferUtils}. */ - public static XrSceneMeshesMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSceneMeshesMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrSceneMeshesMSFT} instance for the specified memory address. */ - public static XrSceneMeshesMSFT create(long address) { - return wrap(XrSceneMeshesMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSceneMeshesMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrSceneMeshesMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSceneMeshesMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSceneMeshesMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSceneMeshesMSFT malloc(MemoryStack stack) { - return wrap(XrSceneMeshesMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSceneMeshesMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSceneMeshesMSFT calloc(MemoryStack stack) { - return wrap(XrSceneMeshesMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSceneMeshesMSFT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSceneMeshesMSFT.NEXT); } - /** Unsafe version of {@link #sceneMeshCount}. */ - public static int nsceneMeshCount(long struct) { return UNSAFE.getInt(null, struct + XrSceneMeshesMSFT.SCENEMESHCOUNT); } - /** Unsafe version of {@link #sceneMeshes}. */ - @Nullable public static XrSceneMeshMSFT.Buffer nsceneMeshes(long struct) { return XrSceneMeshMSFT.createSafe(memGetAddress(struct + XrSceneMeshesMSFT.SCENEMESHES), nsceneMeshCount(struct)); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSceneMeshesMSFT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSceneMeshesMSFT.NEXT, value); } - /** Sets the specified value to the {@code sceneMeshCount} field of the specified {@code struct}. */ - public static void nsceneMeshCount(long struct, int value) { UNSAFE.putInt(null, struct + XrSceneMeshesMSFT.SCENEMESHCOUNT, value); } - /** Unsafe version of {@link #sceneMeshes(XrSceneMeshMSFT.Buffer) sceneMeshes}. */ - public static void nsceneMeshes(long struct, @Nullable XrSceneMeshMSFT.Buffer value) { memPutAddress(struct + XrSceneMeshesMSFT.SCENEMESHES, memAddressSafe(value)); if (value != null) { nsceneMeshCount(struct, value.remaining()); } } - - // ----------------------------------- - - /** An array of {@link XrSceneMeshesMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSceneMeshesMSFT ELEMENT_FACTORY = XrSceneMeshesMSFT.create(-1L); - - /** - * Creates a new {@code XrSceneMeshesMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSceneMeshesMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSceneMeshesMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSceneMeshesMSFT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrSceneMeshesMSFT.nnext(address()); } - /** @return the value of the {@code sceneMeshCount} field. */ - @NativeType("uint32_t") - public int sceneMeshCount() { return XrSceneMeshesMSFT.nsceneMeshCount(address()); } - /** @return a {@link XrSceneMeshMSFT.Buffer} view of the struct array pointed to by the {@code sceneMeshes} field. */ - @Nullable - @NativeType("XrSceneMeshMSFT *") - public XrSceneMeshMSFT.Buffer sceneMeshes() { return XrSceneMeshesMSFT.nsceneMeshes(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSceneMeshesMSFT.ntype(address(), value); return this; } - /** Sets the {@link MSFTSceneUnderstanding#XR_TYPE_SCENE_MESHES_MSFT TYPE_SCENE_MESHES_MSFT} value to the {@code type} field. */ - public Buffer type$Default() { return type(MSFTSceneUnderstanding.XR_TYPE_SCENE_MESHES_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrSceneMeshesMSFT.nnext(address(), value); return this; } - /** Sets the specified value to the {@code sceneMeshCount} field. */ - public Buffer sceneMeshCount(@NativeType("uint32_t") int value) { XrSceneMeshesMSFT.nsceneMeshCount(address(), value); return this; } - /** Sets the address of the specified {@link XrSceneMeshMSFT.Buffer} to the {@code sceneMeshes} field. */ - public Buffer sceneMeshes(@Nullable @NativeType("XrSceneMeshMSFT *") XrSceneMeshMSFT.Buffer value) { XrSceneMeshesMSFT.nsceneMeshes(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneObjectMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneObjectMSFT.java deleted file mode 100644 index a3356146..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneObjectMSFT.java +++ /dev/null @@ -1,246 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSceneObjectMSFT {
- *     XrSceneObjectTypeMSFT objectType;
- * }
- */ -public class XrSceneObjectMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - OBJECTTYPE; - - static { - Layout layout = __struct( - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - OBJECTTYPE = layout.offsetof(0); - } - - /** - * Creates a {@code XrSceneObjectMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSceneObjectMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code objectType} field. */ - @NativeType("XrSceneObjectTypeMSFT") - public int objectType() { return nobjectType(address()); } - - /** Sets the specified value to the {@code objectType} field. */ - public XrSceneObjectMSFT objectType(@NativeType("XrSceneObjectTypeMSFT") int value) { nobjectType(address(), value); return this; } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSceneObjectMSFT set(XrSceneObjectMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSceneObjectMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSceneObjectMSFT malloc() { - return wrap(XrSceneObjectMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSceneObjectMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSceneObjectMSFT calloc() { - return wrap(XrSceneObjectMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSceneObjectMSFT} instance allocated with {@link BufferUtils}. */ - public static XrSceneObjectMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSceneObjectMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrSceneObjectMSFT} instance for the specified memory address. */ - public static XrSceneObjectMSFT create(long address) { - return wrap(XrSceneObjectMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSceneObjectMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrSceneObjectMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSceneObjectMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSceneObjectMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSceneObjectMSFT malloc(MemoryStack stack) { - return wrap(XrSceneObjectMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSceneObjectMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSceneObjectMSFT calloc(MemoryStack stack) { - return wrap(XrSceneObjectMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #objectType}. */ - public static int nobjectType(long struct) { return UNSAFE.getInt(null, struct + XrSceneObjectMSFT.OBJECTTYPE); } - - /** Unsafe version of {@link #objectType(int) objectType}. */ - public static void nobjectType(long struct, int value) { UNSAFE.putInt(null, struct + XrSceneObjectMSFT.OBJECTTYPE, value); } - - // ----------------------------------- - - /** An array of {@link XrSceneObjectMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSceneObjectMSFT ELEMENT_FACTORY = XrSceneObjectMSFT.create(-1L); - - /** - * Creates a new {@code XrSceneObjectMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSceneObjectMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSceneObjectMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code objectType} field. */ - @NativeType("XrSceneObjectTypeMSFT") - public int objectType() { return XrSceneObjectMSFT.nobjectType(address()); } - - /** Sets the specified value to the {@code objectType} field. */ - public Buffer objectType(@NativeType("XrSceneObjectTypeMSFT") int value) { XrSceneObjectMSFT.nobjectType(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneObjectTypesFilterInfoMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneObjectTypesFilterInfoMSFT.java deleted file mode 100644 index 3ffcc27e..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneObjectTypesFilterInfoMSFT.java +++ /dev/null @@ -1,322 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; -import java.nio.IntBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSceneObjectTypesFilterInfoMSFT {
- *     XrStructureType type;
- *     void const * next;
- *     uint32_t objectTypeCount;
- *     XrSceneObjectTypeMSFT const * objectTypes;
- * }
- */ -public class XrSceneObjectTypesFilterInfoMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - OBJECTTYPECOUNT, - OBJECTTYPES; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - OBJECTTYPECOUNT = layout.offsetof(2); - OBJECTTYPES = layout.offsetof(3); - } - - /** - * Creates a {@code XrSceneObjectTypesFilterInfoMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSceneObjectTypesFilterInfoMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code objectTypeCount} field. */ - @NativeType("uint32_t") - public int objectTypeCount() { return nobjectTypeCount(address()); } - /** @return a {@link IntBuffer} view of the data pointed to by the {@code objectTypes} field. */ - @Nullable - @NativeType("XrSceneObjectTypeMSFT const *") - public IntBuffer objectTypes() { return nobjectTypes(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrSceneObjectTypesFilterInfoMSFT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link MSFTSceneUnderstanding#XR_TYPE_SCENE_OBJECT_TYPES_FILTER_INFO_MSFT TYPE_SCENE_OBJECT_TYPES_FILTER_INFO_MSFT} value to the {@code type} field. */ - public XrSceneObjectTypesFilterInfoMSFT type$Default() { return type(MSFTSceneUnderstanding.XR_TYPE_SCENE_OBJECT_TYPES_FILTER_INFO_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public XrSceneObjectTypesFilterInfoMSFT next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code objectTypeCount} field. */ - public XrSceneObjectTypesFilterInfoMSFT objectTypeCount(@NativeType("uint32_t") int value) { nobjectTypeCount(address(), value); return this; } - /** Sets the address of the specified {@link IntBuffer} to the {@code objectTypes} field. */ - public XrSceneObjectTypesFilterInfoMSFT objectTypes(@Nullable @NativeType("XrSceneObjectTypeMSFT const *") IntBuffer value) { nobjectTypes(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrSceneObjectTypesFilterInfoMSFT set( - int type, - long next, - int objectTypeCount, - @Nullable IntBuffer objectTypes - ) { - type(type); - next(next); - objectTypeCount(objectTypeCount); - objectTypes(objectTypes); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSceneObjectTypesFilterInfoMSFT set(XrSceneObjectTypesFilterInfoMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSceneObjectTypesFilterInfoMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSceneObjectTypesFilterInfoMSFT malloc() { - return wrap(XrSceneObjectTypesFilterInfoMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSceneObjectTypesFilterInfoMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSceneObjectTypesFilterInfoMSFT calloc() { - return wrap(XrSceneObjectTypesFilterInfoMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSceneObjectTypesFilterInfoMSFT} instance allocated with {@link BufferUtils}. */ - public static XrSceneObjectTypesFilterInfoMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSceneObjectTypesFilterInfoMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrSceneObjectTypesFilterInfoMSFT} instance for the specified memory address. */ - public static XrSceneObjectTypesFilterInfoMSFT create(long address) { - return wrap(XrSceneObjectTypesFilterInfoMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSceneObjectTypesFilterInfoMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrSceneObjectTypesFilterInfoMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSceneObjectTypesFilterInfoMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSceneObjectTypesFilterInfoMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSceneObjectTypesFilterInfoMSFT malloc(MemoryStack stack) { - return wrap(XrSceneObjectTypesFilterInfoMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSceneObjectTypesFilterInfoMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSceneObjectTypesFilterInfoMSFT calloc(MemoryStack stack) { - return wrap(XrSceneObjectTypesFilterInfoMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSceneObjectTypesFilterInfoMSFT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSceneObjectTypesFilterInfoMSFT.NEXT); } - /** Unsafe version of {@link #objectTypeCount}. */ - public static int nobjectTypeCount(long struct) { return UNSAFE.getInt(null, struct + XrSceneObjectTypesFilterInfoMSFT.OBJECTTYPECOUNT); } - /** Unsafe version of {@link #objectTypes() objectTypes}. */ - @Nullable public static IntBuffer nobjectTypes(long struct) { return memIntBufferSafe(memGetAddress(struct + XrSceneObjectTypesFilterInfoMSFT.OBJECTTYPES), nobjectTypeCount(struct)); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSceneObjectTypesFilterInfoMSFT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSceneObjectTypesFilterInfoMSFT.NEXT, value); } - /** Sets the specified value to the {@code objectTypeCount} field of the specified {@code struct}. */ - public static void nobjectTypeCount(long struct, int value) { UNSAFE.putInt(null, struct + XrSceneObjectTypesFilterInfoMSFT.OBJECTTYPECOUNT, value); } - /** Unsafe version of {@link #objectTypes(IntBuffer) objectTypes}. */ - public static void nobjectTypes(long struct, @Nullable IntBuffer value) { memPutAddress(struct + XrSceneObjectTypesFilterInfoMSFT.OBJECTTYPES, memAddressSafe(value)); if (value != null) { nobjectTypeCount(struct, value.remaining()); } } - - // ----------------------------------- - - /** An array of {@link XrSceneObjectTypesFilterInfoMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSceneObjectTypesFilterInfoMSFT ELEMENT_FACTORY = XrSceneObjectTypesFilterInfoMSFT.create(-1L); - - /** - * Creates a new {@code XrSceneObjectTypesFilterInfoMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSceneObjectTypesFilterInfoMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSceneObjectTypesFilterInfoMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSceneObjectTypesFilterInfoMSFT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrSceneObjectTypesFilterInfoMSFT.nnext(address()); } - /** @return the value of the {@code objectTypeCount} field. */ - @NativeType("uint32_t") - public int objectTypeCount() { return XrSceneObjectTypesFilterInfoMSFT.nobjectTypeCount(address()); } - /** @return a {@link IntBuffer} view of the data pointed to by the {@code objectTypes} field. */ - @Nullable - @NativeType("XrSceneObjectTypeMSFT const *") - public IntBuffer objectTypes() { return XrSceneObjectTypesFilterInfoMSFT.nobjectTypes(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSceneObjectTypesFilterInfoMSFT.ntype(address(), value); return this; } - /** Sets the {@link MSFTSceneUnderstanding#XR_TYPE_SCENE_OBJECT_TYPES_FILTER_INFO_MSFT TYPE_SCENE_OBJECT_TYPES_FILTER_INFO_MSFT} value to the {@code type} field. */ - public Buffer type$Default() { return type(MSFTSceneUnderstanding.XR_TYPE_SCENE_OBJECT_TYPES_FILTER_INFO_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrSceneObjectTypesFilterInfoMSFT.nnext(address(), value); return this; } - /** Sets the specified value to the {@code objectTypeCount} field. */ - public Buffer objectTypeCount(@NativeType("uint32_t") int value) { XrSceneObjectTypesFilterInfoMSFT.nobjectTypeCount(address(), value); return this; } - /** Sets the address of the specified {@link IntBuffer} to the {@code objectTypes} field. */ - public Buffer objectTypes(@Nullable @NativeType("XrSceneObjectTypeMSFT const *") IntBuffer value) { XrSceneObjectTypesFilterInfoMSFT.nobjectTypes(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneObjectsMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneObjectsMSFT.java deleted file mode 100644 index 9180d2b9..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneObjectsMSFT.java +++ /dev/null @@ -1,321 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSceneObjectsMSFT {
- *     XrStructureType type;
- *     void * next;
- *     uint32_t sceneObjectCount;
- *     {@link XrSceneObjectMSFT XrSceneObjectMSFT} * sceneObjects;
- * }
- */ -public class XrSceneObjectsMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - SCENEOBJECTCOUNT, - SCENEOBJECTS; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - SCENEOBJECTCOUNT = layout.offsetof(2); - SCENEOBJECTS = layout.offsetof(3); - } - - /** - * Creates a {@code XrSceneObjectsMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSceneObjectsMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return the value of the {@code sceneObjectCount} field. */ - @NativeType("uint32_t") - public int sceneObjectCount() { return nsceneObjectCount(address()); } - /** @return a {@link XrSceneObjectMSFT.Buffer} view of the struct array pointed to by the {@code sceneObjects} field. */ - @Nullable - @NativeType("XrSceneObjectMSFT *") - public XrSceneObjectMSFT.Buffer sceneObjects() { return nsceneObjects(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrSceneObjectsMSFT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link MSFTSceneUnderstanding#XR_TYPE_SCENE_OBJECTS_MSFT TYPE_SCENE_OBJECTS_MSFT} value to the {@code type} field. */ - public XrSceneObjectsMSFT type$Default() { return type(MSFTSceneUnderstanding.XR_TYPE_SCENE_OBJECTS_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public XrSceneObjectsMSFT next(@NativeType("void *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code sceneObjectCount} field. */ - public XrSceneObjectsMSFT sceneObjectCount(@NativeType("uint32_t") int value) { nsceneObjectCount(address(), value); return this; } - /** Sets the address of the specified {@link XrSceneObjectMSFT.Buffer} to the {@code sceneObjects} field. */ - public XrSceneObjectsMSFT sceneObjects(@Nullable @NativeType("XrSceneObjectMSFT *") XrSceneObjectMSFT.Buffer value) { nsceneObjects(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrSceneObjectsMSFT set( - int type, - long next, - int sceneObjectCount, - @Nullable XrSceneObjectMSFT.Buffer sceneObjects - ) { - type(type); - next(next); - sceneObjectCount(sceneObjectCount); - sceneObjects(sceneObjects); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSceneObjectsMSFT set(XrSceneObjectsMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSceneObjectsMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSceneObjectsMSFT malloc() { - return wrap(XrSceneObjectsMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSceneObjectsMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSceneObjectsMSFT calloc() { - return wrap(XrSceneObjectsMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSceneObjectsMSFT} instance allocated with {@link BufferUtils}. */ - public static XrSceneObjectsMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSceneObjectsMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrSceneObjectsMSFT} instance for the specified memory address. */ - public static XrSceneObjectsMSFT create(long address) { - return wrap(XrSceneObjectsMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSceneObjectsMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrSceneObjectsMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSceneObjectsMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSceneObjectsMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSceneObjectsMSFT malloc(MemoryStack stack) { - return wrap(XrSceneObjectsMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSceneObjectsMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSceneObjectsMSFT calloc(MemoryStack stack) { - return wrap(XrSceneObjectsMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSceneObjectsMSFT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSceneObjectsMSFT.NEXT); } - /** Unsafe version of {@link #sceneObjectCount}. */ - public static int nsceneObjectCount(long struct) { return UNSAFE.getInt(null, struct + XrSceneObjectsMSFT.SCENEOBJECTCOUNT); } - /** Unsafe version of {@link #sceneObjects}. */ - @Nullable public static XrSceneObjectMSFT.Buffer nsceneObjects(long struct) { return XrSceneObjectMSFT.createSafe(memGetAddress(struct + XrSceneObjectsMSFT.SCENEOBJECTS), nsceneObjectCount(struct)); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSceneObjectsMSFT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSceneObjectsMSFT.NEXT, value); } - /** Sets the specified value to the {@code sceneObjectCount} field of the specified {@code struct}. */ - public static void nsceneObjectCount(long struct, int value) { UNSAFE.putInt(null, struct + XrSceneObjectsMSFT.SCENEOBJECTCOUNT, value); } - /** Unsafe version of {@link #sceneObjects(XrSceneObjectMSFT.Buffer) sceneObjects}. */ - public static void nsceneObjects(long struct, @Nullable XrSceneObjectMSFT.Buffer value) { memPutAddress(struct + XrSceneObjectsMSFT.SCENEOBJECTS, memAddressSafe(value)); if (value != null) { nsceneObjectCount(struct, value.remaining()); } } - - // ----------------------------------- - - /** An array of {@link XrSceneObjectsMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSceneObjectsMSFT ELEMENT_FACTORY = XrSceneObjectsMSFT.create(-1L); - - /** - * Creates a new {@code XrSceneObjectsMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSceneObjectsMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSceneObjectsMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSceneObjectsMSFT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrSceneObjectsMSFT.nnext(address()); } - /** @return the value of the {@code sceneObjectCount} field. */ - @NativeType("uint32_t") - public int sceneObjectCount() { return XrSceneObjectsMSFT.nsceneObjectCount(address()); } - /** @return a {@link XrSceneObjectMSFT.Buffer} view of the struct array pointed to by the {@code sceneObjects} field. */ - @Nullable - @NativeType("XrSceneObjectMSFT *") - public XrSceneObjectMSFT.Buffer sceneObjects() { return XrSceneObjectsMSFT.nsceneObjects(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSceneObjectsMSFT.ntype(address(), value); return this; } - /** Sets the {@link MSFTSceneUnderstanding#XR_TYPE_SCENE_OBJECTS_MSFT TYPE_SCENE_OBJECTS_MSFT} value to the {@code type} field. */ - public Buffer type$Default() { return type(MSFTSceneUnderstanding.XR_TYPE_SCENE_OBJECTS_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrSceneObjectsMSFT.nnext(address(), value); return this; } - /** Sets the specified value to the {@code sceneObjectCount} field. */ - public Buffer sceneObjectCount(@NativeType("uint32_t") int value) { XrSceneObjectsMSFT.nsceneObjectCount(address(), value); return this; } - /** Sets the address of the specified {@link XrSceneObjectMSFT.Buffer} to the {@code sceneObjects} field. */ - public Buffer sceneObjects(@Nullable @NativeType("XrSceneObjectMSFT *") XrSceneObjectMSFT.Buffer value) { XrSceneObjectsMSFT.nsceneObjects(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneObserverCreateInfoMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneObserverCreateInfoMSFT.java deleted file mode 100644 index 579de56b..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneObserverCreateInfoMSFT.java +++ /dev/null @@ -1,279 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSceneObserverCreateInfoMSFT {
- *     XrStructureType type;
- *     void const * next;
- * }
- */ -public class XrSceneObserverCreateInfoMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - } - - /** - * Creates a {@code XrSceneObserverCreateInfoMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSceneObserverCreateInfoMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrSceneObserverCreateInfoMSFT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link MSFTSceneUnderstanding#XR_TYPE_SCENE_OBSERVER_CREATE_INFO_MSFT TYPE_SCENE_OBSERVER_CREATE_INFO_MSFT} value to the {@code type} field. */ - public XrSceneObserverCreateInfoMSFT type$Default() { return type(MSFTSceneUnderstanding.XR_TYPE_SCENE_OBSERVER_CREATE_INFO_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public XrSceneObserverCreateInfoMSFT next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrSceneObserverCreateInfoMSFT set( - int type, - long next - ) { - type(type); - next(next); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSceneObserverCreateInfoMSFT set(XrSceneObserverCreateInfoMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSceneObserverCreateInfoMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSceneObserverCreateInfoMSFT malloc() { - return wrap(XrSceneObserverCreateInfoMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSceneObserverCreateInfoMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSceneObserverCreateInfoMSFT calloc() { - return wrap(XrSceneObserverCreateInfoMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSceneObserverCreateInfoMSFT} instance allocated with {@link BufferUtils}. */ - public static XrSceneObserverCreateInfoMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSceneObserverCreateInfoMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrSceneObserverCreateInfoMSFT} instance for the specified memory address. */ - public static XrSceneObserverCreateInfoMSFT create(long address) { - return wrap(XrSceneObserverCreateInfoMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSceneObserverCreateInfoMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrSceneObserverCreateInfoMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSceneObserverCreateInfoMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSceneObserverCreateInfoMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSceneObserverCreateInfoMSFT malloc(MemoryStack stack) { - return wrap(XrSceneObserverCreateInfoMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSceneObserverCreateInfoMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSceneObserverCreateInfoMSFT calloc(MemoryStack stack) { - return wrap(XrSceneObserverCreateInfoMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSceneObserverCreateInfoMSFT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSceneObserverCreateInfoMSFT.NEXT); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSceneObserverCreateInfoMSFT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSceneObserverCreateInfoMSFT.NEXT, value); } - - // ----------------------------------- - - /** An array of {@link XrSceneObserverCreateInfoMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSceneObserverCreateInfoMSFT ELEMENT_FACTORY = XrSceneObserverCreateInfoMSFT.create(-1L); - - /** - * Creates a new {@code XrSceneObserverCreateInfoMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSceneObserverCreateInfoMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSceneObserverCreateInfoMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSceneObserverCreateInfoMSFT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrSceneObserverCreateInfoMSFT.nnext(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSceneObserverCreateInfoMSFT.ntype(address(), value); return this; } - /** Sets the {@link MSFTSceneUnderstanding#XR_TYPE_SCENE_OBSERVER_CREATE_INFO_MSFT TYPE_SCENE_OBSERVER_CREATE_INFO_MSFT} value to the {@code type} field. */ - public Buffer type$Default() { return type(MSFTSceneUnderstanding.XR_TYPE_SCENE_OBSERVER_CREATE_INFO_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrSceneObserverCreateInfoMSFT.nnext(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneObserverMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneObserverMSFT.java deleted file mode 100644 index 517c8a87..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneObserverMSFT.java +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.openxr; - -public class XrSceneObserverMSFT extends DispatchableHandle { - public XrSceneObserverMSFT(long handle, DispatchableHandle session) { - super(handle, session.getCapabilities()); - } - - public XrSceneObserverMSFT(long handle, XRCapabilities capabilities) { - super(handle, capabilities); - } -} diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneOrientedBoxBoundMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneOrientedBoxBoundMSFT.java deleted file mode 100644 index bc3212b1..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneOrientedBoxBoundMSFT.java +++ /dev/null @@ -1,279 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSceneOrientedBoxBoundMSFT {
- *     {@link XrPosef XrPosef} pose;
- *     {@link XrVector3f XrVector3f} extents;
- * }
- */ -public class XrSceneOrientedBoxBoundMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - POSE, - EXTENTS; - - static { - Layout layout = __struct( - __member(XrPosef.SIZEOF, XrPosef.ALIGNOF), - __member(XrVector3f.SIZEOF, XrVector3f.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - POSE = layout.offsetof(0); - EXTENTS = layout.offsetof(1); - } - - /** - * Creates a {@code XrSceneOrientedBoxBoundMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSceneOrientedBoxBoundMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return a {@link XrPosef} view of the {@code pose} field. */ - public XrPosef pose() { return npose(address()); } - /** @return a {@link XrVector3f} view of the {@code extents} field. */ - public XrVector3f extents() { return nextents(address()); } - - /** Copies the specified {@link XrPosef} to the {@code pose} field. */ - public XrSceneOrientedBoxBoundMSFT pose(XrPosef value) { npose(address(), value); return this; } - /** Passes the {@code pose} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrSceneOrientedBoxBoundMSFT pose(java.util.function.Consumer consumer) { consumer.accept(pose()); return this; } - /** Copies the specified {@link XrVector3f} to the {@code extents} field. */ - public XrSceneOrientedBoxBoundMSFT extents(XrVector3f value) { nextents(address(), value); return this; } - /** Passes the {@code extents} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrSceneOrientedBoxBoundMSFT extents(java.util.function.Consumer consumer) { consumer.accept(extents()); return this; } - - /** Initializes this struct with the specified values. */ - public XrSceneOrientedBoxBoundMSFT set( - XrPosef pose, - XrVector3f extents - ) { - pose(pose); - extents(extents); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSceneOrientedBoxBoundMSFT set(XrSceneOrientedBoxBoundMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSceneOrientedBoxBoundMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSceneOrientedBoxBoundMSFT malloc() { - return wrap(XrSceneOrientedBoxBoundMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSceneOrientedBoxBoundMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSceneOrientedBoxBoundMSFT calloc() { - return wrap(XrSceneOrientedBoxBoundMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSceneOrientedBoxBoundMSFT} instance allocated with {@link BufferUtils}. */ - public static XrSceneOrientedBoxBoundMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSceneOrientedBoxBoundMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrSceneOrientedBoxBoundMSFT} instance for the specified memory address. */ - public static XrSceneOrientedBoxBoundMSFT create(long address) { - return wrap(XrSceneOrientedBoxBoundMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSceneOrientedBoxBoundMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrSceneOrientedBoxBoundMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSceneOrientedBoxBoundMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSceneOrientedBoxBoundMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSceneOrientedBoxBoundMSFT malloc(MemoryStack stack) { - return wrap(XrSceneOrientedBoxBoundMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSceneOrientedBoxBoundMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSceneOrientedBoxBoundMSFT calloc(MemoryStack stack) { - return wrap(XrSceneOrientedBoxBoundMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #pose}. */ - public static XrPosef npose(long struct) { return XrPosef.create(struct + XrSceneOrientedBoxBoundMSFT.POSE); } - /** Unsafe version of {@link #extents}. */ - public static XrVector3f nextents(long struct) { return XrVector3f.create(struct + XrSceneOrientedBoxBoundMSFT.EXTENTS); } - - /** Unsafe version of {@link #pose(XrPosef) pose}. */ - public static void npose(long struct, XrPosef value) { memCopy(value.address(), struct + XrSceneOrientedBoxBoundMSFT.POSE, XrPosef.SIZEOF); } - /** Unsafe version of {@link #extents(XrVector3f) extents}. */ - public static void nextents(long struct, XrVector3f value) { memCopy(value.address(), struct + XrSceneOrientedBoxBoundMSFT.EXTENTS, XrVector3f.SIZEOF); } - - // ----------------------------------- - - /** An array of {@link XrSceneOrientedBoxBoundMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSceneOrientedBoxBoundMSFT ELEMENT_FACTORY = XrSceneOrientedBoxBoundMSFT.create(-1L); - - /** - * Creates a new {@code XrSceneOrientedBoxBoundMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSceneOrientedBoxBoundMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSceneOrientedBoxBoundMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link XrPosef} view of the {@code pose} field. */ - public XrPosef pose() { return XrSceneOrientedBoxBoundMSFT.npose(address()); } - /** @return a {@link XrVector3f} view of the {@code extents} field. */ - public XrVector3f extents() { return XrSceneOrientedBoxBoundMSFT.nextents(address()); } - - /** Copies the specified {@link XrPosef} to the {@code pose} field. */ - public Buffer pose(XrPosef value) { XrSceneOrientedBoxBoundMSFT.npose(address(), value); return this; } - /** Passes the {@code pose} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer pose(java.util.function.Consumer consumer) { consumer.accept(pose()); return this; } - /** Copies the specified {@link XrVector3f} to the {@code extents} field. */ - public Buffer extents(XrVector3f value) { XrSceneOrientedBoxBoundMSFT.nextents(address(), value); return this; } - /** Passes the {@code extents} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer extents(java.util.function.Consumer consumer) { consumer.accept(extents()); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrScenePlaneAlignmentFilterInfoMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrScenePlaneAlignmentFilterInfoMSFT.java deleted file mode 100644 index d63de188..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrScenePlaneAlignmentFilterInfoMSFT.java +++ /dev/null @@ -1,322 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; -import java.nio.IntBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrScenePlaneAlignmentFilterInfoMSFT {
- *     XrStructureType type;
- *     void const * next;
- *     uint32_t alignmentCount;
- *     XrScenePlaneAlignmentTypeMSFT const * alignments;
- * }
- */ -public class XrScenePlaneAlignmentFilterInfoMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - ALIGNMENTCOUNT, - ALIGNMENTS; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - ALIGNMENTCOUNT = layout.offsetof(2); - ALIGNMENTS = layout.offsetof(3); - } - - /** - * Creates a {@code XrScenePlaneAlignmentFilterInfoMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrScenePlaneAlignmentFilterInfoMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code alignmentCount} field. */ - @NativeType("uint32_t") - public int alignmentCount() { return nalignmentCount(address()); } - /** @return a {@link IntBuffer} view of the data pointed to by the {@code alignments} field. */ - @Nullable - @NativeType("XrScenePlaneAlignmentTypeMSFT const *") - public IntBuffer alignments() { return nalignments(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrScenePlaneAlignmentFilterInfoMSFT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link MSFTSceneUnderstanding#XR_TYPE_SCENE_PLANE_ALIGNMENT_FILTER_INFO_MSFT TYPE_SCENE_PLANE_ALIGNMENT_FILTER_INFO_MSFT} value to the {@code type} field. */ - public XrScenePlaneAlignmentFilterInfoMSFT type$Default() { return type(MSFTSceneUnderstanding.XR_TYPE_SCENE_PLANE_ALIGNMENT_FILTER_INFO_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public XrScenePlaneAlignmentFilterInfoMSFT next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code alignmentCount} field. */ - public XrScenePlaneAlignmentFilterInfoMSFT alignmentCount(@NativeType("uint32_t") int value) { nalignmentCount(address(), value); return this; } - /** Sets the address of the specified {@link IntBuffer} to the {@code alignments} field. */ - public XrScenePlaneAlignmentFilterInfoMSFT alignments(@Nullable @NativeType("XrScenePlaneAlignmentTypeMSFT const *") IntBuffer value) { nalignments(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrScenePlaneAlignmentFilterInfoMSFT set( - int type, - long next, - int alignmentCount, - @Nullable IntBuffer alignments - ) { - type(type); - next(next); - alignmentCount(alignmentCount); - alignments(alignments); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrScenePlaneAlignmentFilterInfoMSFT set(XrScenePlaneAlignmentFilterInfoMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrScenePlaneAlignmentFilterInfoMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrScenePlaneAlignmentFilterInfoMSFT malloc() { - return wrap(XrScenePlaneAlignmentFilterInfoMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrScenePlaneAlignmentFilterInfoMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrScenePlaneAlignmentFilterInfoMSFT calloc() { - return wrap(XrScenePlaneAlignmentFilterInfoMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrScenePlaneAlignmentFilterInfoMSFT} instance allocated with {@link BufferUtils}. */ - public static XrScenePlaneAlignmentFilterInfoMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrScenePlaneAlignmentFilterInfoMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrScenePlaneAlignmentFilterInfoMSFT} instance for the specified memory address. */ - public static XrScenePlaneAlignmentFilterInfoMSFT create(long address) { - return wrap(XrScenePlaneAlignmentFilterInfoMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrScenePlaneAlignmentFilterInfoMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrScenePlaneAlignmentFilterInfoMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrScenePlaneAlignmentFilterInfoMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrScenePlaneAlignmentFilterInfoMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrScenePlaneAlignmentFilterInfoMSFT malloc(MemoryStack stack) { - return wrap(XrScenePlaneAlignmentFilterInfoMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrScenePlaneAlignmentFilterInfoMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrScenePlaneAlignmentFilterInfoMSFT calloc(MemoryStack stack) { - return wrap(XrScenePlaneAlignmentFilterInfoMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrScenePlaneAlignmentFilterInfoMSFT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrScenePlaneAlignmentFilterInfoMSFT.NEXT); } - /** Unsafe version of {@link #alignmentCount}. */ - public static int nalignmentCount(long struct) { return UNSAFE.getInt(null, struct + XrScenePlaneAlignmentFilterInfoMSFT.ALIGNMENTCOUNT); } - /** Unsafe version of {@link #alignments() alignments}. */ - @Nullable public static IntBuffer nalignments(long struct) { return memIntBufferSafe(memGetAddress(struct + XrScenePlaneAlignmentFilterInfoMSFT.ALIGNMENTS), nalignmentCount(struct)); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrScenePlaneAlignmentFilterInfoMSFT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrScenePlaneAlignmentFilterInfoMSFT.NEXT, value); } - /** Sets the specified value to the {@code alignmentCount} field of the specified {@code struct}. */ - public static void nalignmentCount(long struct, int value) { UNSAFE.putInt(null, struct + XrScenePlaneAlignmentFilterInfoMSFT.ALIGNMENTCOUNT, value); } - /** Unsafe version of {@link #alignments(IntBuffer) alignments}. */ - public static void nalignments(long struct, @Nullable IntBuffer value) { memPutAddress(struct + XrScenePlaneAlignmentFilterInfoMSFT.ALIGNMENTS, memAddressSafe(value)); if (value != null) { nalignmentCount(struct, value.remaining()); } } - - // ----------------------------------- - - /** An array of {@link XrScenePlaneAlignmentFilterInfoMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrScenePlaneAlignmentFilterInfoMSFT ELEMENT_FACTORY = XrScenePlaneAlignmentFilterInfoMSFT.create(-1L); - - /** - * Creates a new {@code XrScenePlaneAlignmentFilterInfoMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrScenePlaneAlignmentFilterInfoMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrScenePlaneAlignmentFilterInfoMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrScenePlaneAlignmentFilterInfoMSFT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrScenePlaneAlignmentFilterInfoMSFT.nnext(address()); } - /** @return the value of the {@code alignmentCount} field. */ - @NativeType("uint32_t") - public int alignmentCount() { return XrScenePlaneAlignmentFilterInfoMSFT.nalignmentCount(address()); } - /** @return a {@link IntBuffer} view of the data pointed to by the {@code alignments} field. */ - @Nullable - @NativeType("XrScenePlaneAlignmentTypeMSFT const *") - public IntBuffer alignments() { return XrScenePlaneAlignmentFilterInfoMSFT.nalignments(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrScenePlaneAlignmentFilterInfoMSFT.ntype(address(), value); return this; } - /** Sets the {@link MSFTSceneUnderstanding#XR_TYPE_SCENE_PLANE_ALIGNMENT_FILTER_INFO_MSFT TYPE_SCENE_PLANE_ALIGNMENT_FILTER_INFO_MSFT} value to the {@code type} field. */ - public Buffer type$Default() { return type(MSFTSceneUnderstanding.XR_TYPE_SCENE_PLANE_ALIGNMENT_FILTER_INFO_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrScenePlaneAlignmentFilterInfoMSFT.nnext(address(), value); return this; } - /** Sets the specified value to the {@code alignmentCount} field. */ - public Buffer alignmentCount(@NativeType("uint32_t") int value) { XrScenePlaneAlignmentFilterInfoMSFT.nalignmentCount(address(), value); return this; } - /** Sets the address of the specified {@link IntBuffer} to the {@code alignments} field. */ - public Buffer alignments(@Nullable @NativeType("XrScenePlaneAlignmentTypeMSFT const *") IntBuffer value) { XrScenePlaneAlignmentFilterInfoMSFT.nalignments(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrScenePlaneMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrScenePlaneMSFT.java deleted file mode 100644 index b7589851..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrScenePlaneMSFT.java +++ /dev/null @@ -1,317 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrScenePlaneMSFT {
- *     XrScenePlaneAlignmentTypeMSFT alignment;
- *     {@link XrExtent2Df XrExtent2Df} size;
- *     uint64_t meshBufferId;
- *     XrBool32 supportsIndicesUint16;
- * }
- */ -public class XrScenePlaneMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - ALIGNMENT, - SIZE, - MESHBUFFERID, - SUPPORTSINDICESUINT16; - - static { - Layout layout = __struct( - __member(4), - __member(XrExtent2Df.SIZEOF, XrExtent2Df.ALIGNOF), - __member(8), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - ALIGNMENT = layout.offsetof(0); - SIZE = layout.offsetof(1); - MESHBUFFERID = layout.offsetof(2); - SUPPORTSINDICESUINT16 = layout.offsetof(3); - } - - /** - * Creates a {@code XrScenePlaneMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrScenePlaneMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code alignment} field. */ - @NativeType("XrScenePlaneAlignmentTypeMSFT") - public int alignment() { return nalignment(address()); } - /** @return a {@link XrExtent2Df} view of the {@code size} field. */ - public XrExtent2Df size() { return nsize(address()); } - /** @return the value of the {@code meshBufferId} field. */ - @NativeType("uint64_t") - public long meshBufferId() { return nmeshBufferId(address()); } - /** @return the value of the {@code supportsIndicesUint16} field. */ - @NativeType("XrBool32") - public boolean supportsIndicesUint16() { return nsupportsIndicesUint16(address()) != 0; } - - /** Sets the specified value to the {@code alignment} field. */ - public XrScenePlaneMSFT alignment(@NativeType("XrScenePlaneAlignmentTypeMSFT") int value) { nalignment(address(), value); return this; } - /** Copies the specified {@link XrExtent2Df} to the {@code size} field. */ - public XrScenePlaneMSFT size(XrExtent2Df value) { nsize(address(), value); return this; } - /** Passes the {@code size} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrScenePlaneMSFT size(java.util.function.Consumer consumer) { consumer.accept(size()); return this; } - /** Sets the specified value to the {@code meshBufferId} field. */ - public XrScenePlaneMSFT meshBufferId(@NativeType("uint64_t") long value) { nmeshBufferId(address(), value); return this; } - /** Sets the specified value to the {@code supportsIndicesUint16} field. */ - public XrScenePlaneMSFT supportsIndicesUint16(@NativeType("XrBool32") boolean value) { nsupportsIndicesUint16(address(), value ? 1 : 0); return this; } - - /** Initializes this struct with the specified values. */ - public XrScenePlaneMSFT set( - int alignment, - XrExtent2Df size, - long meshBufferId, - boolean supportsIndicesUint16 - ) { - alignment(alignment); - size(size); - meshBufferId(meshBufferId); - supportsIndicesUint16(supportsIndicesUint16); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrScenePlaneMSFT set(XrScenePlaneMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrScenePlaneMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrScenePlaneMSFT malloc() { - return wrap(XrScenePlaneMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrScenePlaneMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrScenePlaneMSFT calloc() { - return wrap(XrScenePlaneMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrScenePlaneMSFT} instance allocated with {@link BufferUtils}. */ - public static XrScenePlaneMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrScenePlaneMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrScenePlaneMSFT} instance for the specified memory address. */ - public static XrScenePlaneMSFT create(long address) { - return wrap(XrScenePlaneMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrScenePlaneMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrScenePlaneMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrScenePlaneMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrScenePlaneMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrScenePlaneMSFT malloc(MemoryStack stack) { - return wrap(XrScenePlaneMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrScenePlaneMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrScenePlaneMSFT calloc(MemoryStack stack) { - return wrap(XrScenePlaneMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #alignment}. */ - public static int nalignment(long struct) { return UNSAFE.getInt(null, struct + XrScenePlaneMSFT.ALIGNMENT); } - /** Unsafe version of {@link #size}. */ - public static XrExtent2Df nsize(long struct) { return XrExtent2Df.create(struct + XrScenePlaneMSFT.SIZE); } - /** Unsafe version of {@link #meshBufferId}. */ - public static long nmeshBufferId(long struct) { return UNSAFE.getLong(null, struct + XrScenePlaneMSFT.MESHBUFFERID); } - /** Unsafe version of {@link #supportsIndicesUint16}. */ - public static int nsupportsIndicesUint16(long struct) { return UNSAFE.getInt(null, struct + XrScenePlaneMSFT.SUPPORTSINDICESUINT16); } - - /** Unsafe version of {@link #alignment(int) alignment}. */ - public static void nalignment(long struct, int value) { UNSAFE.putInt(null, struct + XrScenePlaneMSFT.ALIGNMENT, value); } - /** Unsafe version of {@link #size(XrExtent2Df) size}. */ - public static void nsize(long struct, XrExtent2Df value) { memCopy(value.address(), struct + XrScenePlaneMSFT.SIZE, XrExtent2Df.SIZEOF); } - /** Unsafe version of {@link #meshBufferId(long) meshBufferId}. */ - public static void nmeshBufferId(long struct, long value) { UNSAFE.putLong(null, struct + XrScenePlaneMSFT.MESHBUFFERID, value); } - /** Unsafe version of {@link #supportsIndicesUint16(boolean) supportsIndicesUint16}. */ - public static void nsupportsIndicesUint16(long struct, int value) { UNSAFE.putInt(null, struct + XrScenePlaneMSFT.SUPPORTSINDICESUINT16, value); } - - // ----------------------------------- - - /** An array of {@link XrScenePlaneMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrScenePlaneMSFT ELEMENT_FACTORY = XrScenePlaneMSFT.create(-1L); - - /** - * Creates a new {@code XrScenePlaneMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrScenePlaneMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrScenePlaneMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code alignment} field. */ - @NativeType("XrScenePlaneAlignmentTypeMSFT") - public int alignment() { return XrScenePlaneMSFT.nalignment(address()); } - /** @return a {@link XrExtent2Df} view of the {@code size} field. */ - public XrExtent2Df size() { return XrScenePlaneMSFT.nsize(address()); } - /** @return the value of the {@code meshBufferId} field. */ - @NativeType("uint64_t") - public long meshBufferId() { return XrScenePlaneMSFT.nmeshBufferId(address()); } - /** @return the value of the {@code supportsIndicesUint16} field. */ - @NativeType("XrBool32") - public boolean supportsIndicesUint16() { return XrScenePlaneMSFT.nsupportsIndicesUint16(address()) != 0; } - - /** Sets the specified value to the {@code alignment} field. */ - public Buffer alignment(@NativeType("XrScenePlaneAlignmentTypeMSFT") int value) { XrScenePlaneMSFT.nalignment(address(), value); return this; } - /** Copies the specified {@link XrExtent2Df} to the {@code size} field. */ - public Buffer size(XrExtent2Df value) { XrScenePlaneMSFT.nsize(address(), value); return this; } - /** Passes the {@code size} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer size(java.util.function.Consumer consumer) { consumer.accept(size()); return this; } - /** Sets the specified value to the {@code meshBufferId} field. */ - public Buffer meshBufferId(@NativeType("uint64_t") long value) { XrScenePlaneMSFT.nmeshBufferId(address(), value); return this; } - /** Sets the specified value to the {@code supportsIndicesUint16} field. */ - public Buffer supportsIndicesUint16(@NativeType("XrBool32") boolean value) { XrScenePlaneMSFT.nsupportsIndicesUint16(address(), value ? 1 : 0); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrScenePlanesMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrScenePlanesMSFT.java deleted file mode 100644 index dfd34c2d..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrScenePlanesMSFT.java +++ /dev/null @@ -1,321 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrScenePlanesMSFT {
- *     XrStructureType type;
- *     void * next;
- *     uint32_t scenePlaneCount;
- *     {@link XrScenePlaneMSFT XrScenePlaneMSFT} * scenePlanes;
- * }
- */ -public class XrScenePlanesMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - SCENEPLANECOUNT, - SCENEPLANES; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - SCENEPLANECOUNT = layout.offsetof(2); - SCENEPLANES = layout.offsetof(3); - } - - /** - * Creates a {@code XrScenePlanesMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrScenePlanesMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return the value of the {@code scenePlaneCount} field. */ - @NativeType("uint32_t") - public int scenePlaneCount() { return nscenePlaneCount(address()); } - /** @return a {@link XrScenePlaneMSFT.Buffer} view of the struct array pointed to by the {@code scenePlanes} field. */ - @Nullable - @NativeType("XrScenePlaneMSFT *") - public XrScenePlaneMSFT.Buffer scenePlanes() { return nscenePlanes(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrScenePlanesMSFT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link MSFTSceneUnderstanding#XR_TYPE_SCENE_PLANES_MSFT TYPE_SCENE_PLANES_MSFT} value to the {@code type} field. */ - public XrScenePlanesMSFT type$Default() { return type(MSFTSceneUnderstanding.XR_TYPE_SCENE_PLANES_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public XrScenePlanesMSFT next(@NativeType("void *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code scenePlaneCount} field. */ - public XrScenePlanesMSFT scenePlaneCount(@NativeType("uint32_t") int value) { nscenePlaneCount(address(), value); return this; } - /** Sets the address of the specified {@link XrScenePlaneMSFT.Buffer} to the {@code scenePlanes} field. */ - public XrScenePlanesMSFT scenePlanes(@Nullable @NativeType("XrScenePlaneMSFT *") XrScenePlaneMSFT.Buffer value) { nscenePlanes(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrScenePlanesMSFT set( - int type, - long next, - int scenePlaneCount, - @Nullable XrScenePlaneMSFT.Buffer scenePlanes - ) { - type(type); - next(next); - scenePlaneCount(scenePlaneCount); - scenePlanes(scenePlanes); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrScenePlanesMSFT set(XrScenePlanesMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrScenePlanesMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrScenePlanesMSFT malloc() { - return wrap(XrScenePlanesMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrScenePlanesMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrScenePlanesMSFT calloc() { - return wrap(XrScenePlanesMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrScenePlanesMSFT} instance allocated with {@link BufferUtils}. */ - public static XrScenePlanesMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrScenePlanesMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrScenePlanesMSFT} instance for the specified memory address. */ - public static XrScenePlanesMSFT create(long address) { - return wrap(XrScenePlanesMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrScenePlanesMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrScenePlanesMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrScenePlanesMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrScenePlanesMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrScenePlanesMSFT malloc(MemoryStack stack) { - return wrap(XrScenePlanesMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrScenePlanesMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrScenePlanesMSFT calloc(MemoryStack stack) { - return wrap(XrScenePlanesMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrScenePlanesMSFT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrScenePlanesMSFT.NEXT); } - /** Unsafe version of {@link #scenePlaneCount}. */ - public static int nscenePlaneCount(long struct) { return UNSAFE.getInt(null, struct + XrScenePlanesMSFT.SCENEPLANECOUNT); } - /** Unsafe version of {@link #scenePlanes}. */ - @Nullable public static XrScenePlaneMSFT.Buffer nscenePlanes(long struct) { return XrScenePlaneMSFT.createSafe(memGetAddress(struct + XrScenePlanesMSFT.SCENEPLANES), nscenePlaneCount(struct)); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrScenePlanesMSFT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrScenePlanesMSFT.NEXT, value); } - /** Sets the specified value to the {@code scenePlaneCount} field of the specified {@code struct}. */ - public static void nscenePlaneCount(long struct, int value) { UNSAFE.putInt(null, struct + XrScenePlanesMSFT.SCENEPLANECOUNT, value); } - /** Unsafe version of {@link #scenePlanes(XrScenePlaneMSFT.Buffer) scenePlanes}. */ - public static void nscenePlanes(long struct, @Nullable XrScenePlaneMSFT.Buffer value) { memPutAddress(struct + XrScenePlanesMSFT.SCENEPLANES, memAddressSafe(value)); if (value != null) { nscenePlaneCount(struct, value.remaining()); } } - - // ----------------------------------- - - /** An array of {@link XrScenePlanesMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrScenePlanesMSFT ELEMENT_FACTORY = XrScenePlanesMSFT.create(-1L); - - /** - * Creates a new {@code XrScenePlanesMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrScenePlanesMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrScenePlanesMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrScenePlanesMSFT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrScenePlanesMSFT.nnext(address()); } - /** @return the value of the {@code scenePlaneCount} field. */ - @NativeType("uint32_t") - public int scenePlaneCount() { return XrScenePlanesMSFT.nscenePlaneCount(address()); } - /** @return a {@link XrScenePlaneMSFT.Buffer} view of the struct array pointed to by the {@code scenePlanes} field. */ - @Nullable - @NativeType("XrScenePlaneMSFT *") - public XrScenePlaneMSFT.Buffer scenePlanes() { return XrScenePlanesMSFT.nscenePlanes(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrScenePlanesMSFT.ntype(address(), value); return this; } - /** Sets the {@link MSFTSceneUnderstanding#XR_TYPE_SCENE_PLANES_MSFT TYPE_SCENE_PLANES_MSFT} value to the {@code type} field. */ - public Buffer type$Default() { return type(MSFTSceneUnderstanding.XR_TYPE_SCENE_PLANES_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrScenePlanesMSFT.nnext(address(), value); return this; } - /** Sets the specified value to the {@code scenePlaneCount} field. */ - public Buffer scenePlaneCount(@NativeType("uint32_t") int value) { XrScenePlanesMSFT.nscenePlaneCount(address(), value); return this; } - /** Sets the address of the specified {@link XrScenePlaneMSFT.Buffer} to the {@code scenePlanes} field. */ - public Buffer scenePlanes(@Nullable @NativeType("XrScenePlaneMSFT *") XrScenePlaneMSFT.Buffer value) { XrScenePlanesMSFT.nscenePlanes(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneSphereBoundMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneSphereBoundMSFT.java deleted file mode 100644 index a3876a92..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSceneSphereBoundMSFT.java +++ /dev/null @@ -1,275 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSceneSphereBoundMSFT {
- *     {@link XrVector3f XrVector3f} center;
- *     float radius;
- * }
- */ -public class XrSceneSphereBoundMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - CENTER, - RADIUS; - - static { - Layout layout = __struct( - __member(XrVector3f.SIZEOF, XrVector3f.ALIGNOF), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - CENTER = layout.offsetof(0); - RADIUS = layout.offsetof(1); - } - - /** - * Creates a {@code XrSceneSphereBoundMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSceneSphereBoundMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return a {@link XrVector3f} view of the {@code center} field. */ - public XrVector3f center() { return ncenter(address()); } - /** @return the value of the {@code radius} field. */ - public float radius() { return nradius(address()); } - - /** Copies the specified {@link XrVector3f} to the {@code center} field. */ - public XrSceneSphereBoundMSFT center(XrVector3f value) { ncenter(address(), value); return this; } - /** Passes the {@code center} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrSceneSphereBoundMSFT center(java.util.function.Consumer consumer) { consumer.accept(center()); return this; } - /** Sets the specified value to the {@code radius} field. */ - public XrSceneSphereBoundMSFT radius(float value) { nradius(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrSceneSphereBoundMSFT set( - XrVector3f center, - float radius - ) { - center(center); - radius(radius); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSceneSphereBoundMSFT set(XrSceneSphereBoundMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSceneSphereBoundMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSceneSphereBoundMSFT malloc() { - return wrap(XrSceneSphereBoundMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSceneSphereBoundMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSceneSphereBoundMSFT calloc() { - return wrap(XrSceneSphereBoundMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSceneSphereBoundMSFT} instance allocated with {@link BufferUtils}. */ - public static XrSceneSphereBoundMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSceneSphereBoundMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrSceneSphereBoundMSFT} instance for the specified memory address. */ - public static XrSceneSphereBoundMSFT create(long address) { - return wrap(XrSceneSphereBoundMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSceneSphereBoundMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrSceneSphereBoundMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSceneSphereBoundMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSceneSphereBoundMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSceneSphereBoundMSFT malloc(MemoryStack stack) { - return wrap(XrSceneSphereBoundMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSceneSphereBoundMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSceneSphereBoundMSFT calloc(MemoryStack stack) { - return wrap(XrSceneSphereBoundMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #center}. */ - public static XrVector3f ncenter(long struct) { return XrVector3f.create(struct + XrSceneSphereBoundMSFT.CENTER); } - /** Unsafe version of {@link #radius}. */ - public static float nradius(long struct) { return UNSAFE.getFloat(null, struct + XrSceneSphereBoundMSFT.RADIUS); } - - /** Unsafe version of {@link #center(XrVector3f) center}. */ - public static void ncenter(long struct, XrVector3f value) { memCopy(value.address(), struct + XrSceneSphereBoundMSFT.CENTER, XrVector3f.SIZEOF); } - /** Unsafe version of {@link #radius(float) radius}. */ - public static void nradius(long struct, float value) { UNSAFE.putFloat(null, struct + XrSceneSphereBoundMSFT.RADIUS, value); } - - // ----------------------------------- - - /** An array of {@link XrSceneSphereBoundMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSceneSphereBoundMSFT ELEMENT_FACTORY = XrSceneSphereBoundMSFT.create(-1L); - - /** - * Creates a new {@code XrSceneSphereBoundMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSceneSphereBoundMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSceneSphereBoundMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link XrVector3f} view of the {@code center} field. */ - public XrVector3f center() { return XrSceneSphereBoundMSFT.ncenter(address()); } - /** @return the value of the {@code radius} field. */ - public float radius() { return XrSceneSphereBoundMSFT.nradius(address()); } - - /** Copies the specified {@link XrVector3f} to the {@code center} field. */ - public Buffer center(XrVector3f value) { XrSceneSphereBoundMSFT.ncenter(address(), value); return this; } - /** Passes the {@code center} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer center(java.util.function.Consumer consumer) { consumer.accept(center()); return this; } - /** Sets the specified value to the {@code radius} field. */ - public Buffer radius(float value) { XrSceneSphereBoundMSFT.nradius(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSecondaryViewConfigurationFrameEndInfoMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSecondaryViewConfigurationFrameEndInfoMSFT.java deleted file mode 100644 index 7c66f2b3..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSecondaryViewConfigurationFrameEndInfoMSFT.java +++ /dev/null @@ -1,338 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSecondaryViewConfigurationFrameEndInfoMSFT {
- *     XrStructureType type;
- *     void const * next;
- *     uint32_t viewConfigurationCount;
- *     {@link XrSecondaryViewConfigurationLayerInfoMSFT XrSecondaryViewConfigurationLayerInfoMSFT} const * viewConfigurationLayersInfo;
- * }
- */ -public class XrSecondaryViewConfigurationFrameEndInfoMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - VIEWCONFIGURATIONCOUNT, - VIEWCONFIGURATIONLAYERSINFO; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - VIEWCONFIGURATIONCOUNT = layout.offsetof(2); - VIEWCONFIGURATIONLAYERSINFO = layout.offsetof(3); - } - - /** - * Creates a {@code XrSecondaryViewConfigurationFrameEndInfoMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSecondaryViewConfigurationFrameEndInfoMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code viewConfigurationCount} field. */ - @NativeType("uint32_t") - public int viewConfigurationCount() { return nviewConfigurationCount(address()); } - /** @return a {@link XrSecondaryViewConfigurationLayerInfoMSFT.Buffer} view of the struct array pointed to by the {@code viewConfigurationLayersInfo} field. */ - @NativeType("XrSecondaryViewConfigurationLayerInfoMSFT const *") - public XrSecondaryViewConfigurationLayerInfoMSFT.Buffer viewConfigurationLayersInfo() { return nviewConfigurationLayersInfo(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrSecondaryViewConfigurationFrameEndInfoMSFT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link MSFTSecondaryViewConfiguration#XR_TYPE_SECONDARY_VIEW_CONFIGURATION_FRAME_END_INFO_MSFT TYPE_SECONDARY_VIEW_CONFIGURATION_FRAME_END_INFO_MSFT} value to the {@code type} field. */ - public XrSecondaryViewConfigurationFrameEndInfoMSFT type$Default() { return type(MSFTSecondaryViewConfiguration.XR_TYPE_SECONDARY_VIEW_CONFIGURATION_FRAME_END_INFO_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public XrSecondaryViewConfigurationFrameEndInfoMSFT next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the address of the specified {@link XrSecondaryViewConfigurationLayerInfoMSFT.Buffer} to the {@code viewConfigurationLayersInfo} field. */ - public XrSecondaryViewConfigurationFrameEndInfoMSFT viewConfigurationLayersInfo(@NativeType("XrSecondaryViewConfigurationLayerInfoMSFT const *") XrSecondaryViewConfigurationLayerInfoMSFT.Buffer value) { nviewConfigurationLayersInfo(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrSecondaryViewConfigurationFrameEndInfoMSFT set( - int type, - long next, - XrSecondaryViewConfigurationLayerInfoMSFT.Buffer viewConfigurationLayersInfo - ) { - type(type); - next(next); - viewConfigurationLayersInfo(viewConfigurationLayersInfo); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSecondaryViewConfigurationFrameEndInfoMSFT set(XrSecondaryViewConfigurationFrameEndInfoMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSecondaryViewConfigurationFrameEndInfoMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSecondaryViewConfigurationFrameEndInfoMSFT malloc() { - return wrap(XrSecondaryViewConfigurationFrameEndInfoMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSecondaryViewConfigurationFrameEndInfoMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSecondaryViewConfigurationFrameEndInfoMSFT calloc() { - return wrap(XrSecondaryViewConfigurationFrameEndInfoMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSecondaryViewConfigurationFrameEndInfoMSFT} instance allocated with {@link BufferUtils}. */ - public static XrSecondaryViewConfigurationFrameEndInfoMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSecondaryViewConfigurationFrameEndInfoMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrSecondaryViewConfigurationFrameEndInfoMSFT} instance for the specified memory address. */ - public static XrSecondaryViewConfigurationFrameEndInfoMSFT create(long address) { - return wrap(XrSecondaryViewConfigurationFrameEndInfoMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSecondaryViewConfigurationFrameEndInfoMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrSecondaryViewConfigurationFrameEndInfoMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSecondaryViewConfigurationFrameEndInfoMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSecondaryViewConfigurationFrameEndInfoMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSecondaryViewConfigurationFrameEndInfoMSFT malloc(MemoryStack stack) { - return wrap(XrSecondaryViewConfigurationFrameEndInfoMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSecondaryViewConfigurationFrameEndInfoMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSecondaryViewConfigurationFrameEndInfoMSFT calloc(MemoryStack stack) { - return wrap(XrSecondaryViewConfigurationFrameEndInfoMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSecondaryViewConfigurationFrameEndInfoMSFT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSecondaryViewConfigurationFrameEndInfoMSFT.NEXT); } - /** Unsafe version of {@link #viewConfigurationCount}. */ - public static int nviewConfigurationCount(long struct) { return UNSAFE.getInt(null, struct + XrSecondaryViewConfigurationFrameEndInfoMSFT.VIEWCONFIGURATIONCOUNT); } - /** Unsafe version of {@link #viewConfigurationLayersInfo}. */ - public static XrSecondaryViewConfigurationLayerInfoMSFT.Buffer nviewConfigurationLayersInfo(long struct) { return XrSecondaryViewConfigurationLayerInfoMSFT.create(memGetAddress(struct + XrSecondaryViewConfigurationFrameEndInfoMSFT.VIEWCONFIGURATIONLAYERSINFO), nviewConfigurationCount(struct)); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSecondaryViewConfigurationFrameEndInfoMSFT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSecondaryViewConfigurationFrameEndInfoMSFT.NEXT, value); } - /** Sets the specified value to the {@code viewConfigurationCount} field of the specified {@code struct}. */ - public static void nviewConfigurationCount(long struct, int value) { UNSAFE.putInt(null, struct + XrSecondaryViewConfigurationFrameEndInfoMSFT.VIEWCONFIGURATIONCOUNT, value); } - /** Unsafe version of {@link #viewConfigurationLayersInfo(XrSecondaryViewConfigurationLayerInfoMSFT.Buffer) viewConfigurationLayersInfo}. */ - public static void nviewConfigurationLayersInfo(long struct, XrSecondaryViewConfigurationLayerInfoMSFT.Buffer value) { memPutAddress(struct + XrSecondaryViewConfigurationFrameEndInfoMSFT.VIEWCONFIGURATIONLAYERSINFO, value.address()); nviewConfigurationCount(struct, value.remaining()); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - int viewConfigurationCount = nviewConfigurationCount(struct); - long viewConfigurationLayersInfo = memGetAddress(struct + XrSecondaryViewConfigurationFrameEndInfoMSFT.VIEWCONFIGURATIONLAYERSINFO); - check(viewConfigurationLayersInfo); - XrSecondaryViewConfigurationLayerInfoMSFT.validate(viewConfigurationLayersInfo, viewConfigurationCount); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrSecondaryViewConfigurationFrameEndInfoMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSecondaryViewConfigurationFrameEndInfoMSFT ELEMENT_FACTORY = XrSecondaryViewConfigurationFrameEndInfoMSFT.create(-1L); - - /** - * Creates a new {@code XrSecondaryViewConfigurationFrameEndInfoMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSecondaryViewConfigurationFrameEndInfoMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSecondaryViewConfigurationFrameEndInfoMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSecondaryViewConfigurationFrameEndInfoMSFT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrSecondaryViewConfigurationFrameEndInfoMSFT.nnext(address()); } - /** @return the value of the {@code viewConfigurationCount} field. */ - @NativeType("uint32_t") - public int viewConfigurationCount() { return XrSecondaryViewConfigurationFrameEndInfoMSFT.nviewConfigurationCount(address()); } - /** @return a {@link XrSecondaryViewConfigurationLayerInfoMSFT.Buffer} view of the struct array pointed to by the {@code viewConfigurationLayersInfo} field. */ - @NativeType("XrSecondaryViewConfigurationLayerInfoMSFT const *") - public XrSecondaryViewConfigurationLayerInfoMSFT.Buffer viewConfigurationLayersInfo() { return XrSecondaryViewConfigurationFrameEndInfoMSFT.nviewConfigurationLayersInfo(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSecondaryViewConfigurationFrameEndInfoMSFT.ntype(address(), value); return this; } - /** Sets the {@link MSFTSecondaryViewConfiguration#XR_TYPE_SECONDARY_VIEW_CONFIGURATION_FRAME_END_INFO_MSFT TYPE_SECONDARY_VIEW_CONFIGURATION_FRAME_END_INFO_MSFT} value to the {@code type} field. */ - public Buffer type$Default() { return type(MSFTSecondaryViewConfiguration.XR_TYPE_SECONDARY_VIEW_CONFIGURATION_FRAME_END_INFO_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrSecondaryViewConfigurationFrameEndInfoMSFT.nnext(address(), value); return this; } - /** Sets the address of the specified {@link XrSecondaryViewConfigurationLayerInfoMSFT.Buffer} to the {@code viewConfigurationLayersInfo} field. */ - public Buffer viewConfigurationLayersInfo(@NativeType("XrSecondaryViewConfigurationLayerInfoMSFT const *") XrSecondaryViewConfigurationLayerInfoMSFT.Buffer value) { XrSecondaryViewConfigurationFrameEndInfoMSFT.nviewConfigurationLayersInfo(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSecondaryViewConfigurationFrameStateMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSecondaryViewConfigurationFrameStateMSFT.java deleted file mode 100644 index 205dba51..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSecondaryViewConfigurationFrameStateMSFT.java +++ /dev/null @@ -1,335 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSecondaryViewConfigurationFrameStateMSFT {
- *     XrStructureType type;
- *     void * next;
- *     uint32_t viewConfigurationCount;
- *     {@link XrSecondaryViewConfigurationStateMSFT XrSecondaryViewConfigurationStateMSFT} * viewConfigurationStates;
- * }
- */ -public class XrSecondaryViewConfigurationFrameStateMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - VIEWCONFIGURATIONCOUNT, - VIEWCONFIGURATIONSTATES; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - VIEWCONFIGURATIONCOUNT = layout.offsetof(2); - VIEWCONFIGURATIONSTATES = layout.offsetof(3); - } - - /** - * Creates a {@code XrSecondaryViewConfigurationFrameStateMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSecondaryViewConfigurationFrameStateMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return the value of the {@code viewConfigurationCount} field. */ - @NativeType("uint32_t") - public int viewConfigurationCount() { return nviewConfigurationCount(address()); } - /** @return a {@link XrSecondaryViewConfigurationStateMSFT.Buffer} view of the struct array pointed to by the {@code viewConfigurationStates} field. */ - @NativeType("XrSecondaryViewConfigurationStateMSFT *") - public XrSecondaryViewConfigurationStateMSFT.Buffer viewConfigurationStates() { return nviewConfigurationStates(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrSecondaryViewConfigurationFrameStateMSFT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link MSFTSecondaryViewConfiguration#XR_TYPE_SECONDARY_VIEW_CONFIGURATION_FRAME_STATE_MSFT TYPE_SECONDARY_VIEW_CONFIGURATION_FRAME_STATE_MSFT} value to the {@code type} field. */ - public XrSecondaryViewConfigurationFrameStateMSFT type$Default() { return type(MSFTSecondaryViewConfiguration.XR_TYPE_SECONDARY_VIEW_CONFIGURATION_FRAME_STATE_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public XrSecondaryViewConfigurationFrameStateMSFT next(@NativeType("void *") long value) { nnext(address(), value); return this; } - /** Sets the address of the specified {@link XrSecondaryViewConfigurationStateMSFT.Buffer} to the {@code viewConfigurationStates} field. */ - public XrSecondaryViewConfigurationFrameStateMSFT viewConfigurationStates(@NativeType("XrSecondaryViewConfigurationStateMSFT *") XrSecondaryViewConfigurationStateMSFT.Buffer value) { nviewConfigurationStates(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrSecondaryViewConfigurationFrameStateMSFT set( - int type, - long next, - XrSecondaryViewConfigurationStateMSFT.Buffer viewConfigurationStates - ) { - type(type); - next(next); - viewConfigurationStates(viewConfigurationStates); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSecondaryViewConfigurationFrameStateMSFT set(XrSecondaryViewConfigurationFrameStateMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSecondaryViewConfigurationFrameStateMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSecondaryViewConfigurationFrameStateMSFT malloc() { - return wrap(XrSecondaryViewConfigurationFrameStateMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSecondaryViewConfigurationFrameStateMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSecondaryViewConfigurationFrameStateMSFT calloc() { - return wrap(XrSecondaryViewConfigurationFrameStateMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSecondaryViewConfigurationFrameStateMSFT} instance allocated with {@link BufferUtils}. */ - public static XrSecondaryViewConfigurationFrameStateMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSecondaryViewConfigurationFrameStateMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrSecondaryViewConfigurationFrameStateMSFT} instance for the specified memory address. */ - public static XrSecondaryViewConfigurationFrameStateMSFT create(long address) { - return wrap(XrSecondaryViewConfigurationFrameStateMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSecondaryViewConfigurationFrameStateMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrSecondaryViewConfigurationFrameStateMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSecondaryViewConfigurationFrameStateMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSecondaryViewConfigurationFrameStateMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSecondaryViewConfigurationFrameStateMSFT malloc(MemoryStack stack) { - return wrap(XrSecondaryViewConfigurationFrameStateMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSecondaryViewConfigurationFrameStateMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSecondaryViewConfigurationFrameStateMSFT calloc(MemoryStack stack) { - return wrap(XrSecondaryViewConfigurationFrameStateMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSecondaryViewConfigurationFrameStateMSFT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSecondaryViewConfigurationFrameStateMSFT.NEXT); } - /** Unsafe version of {@link #viewConfigurationCount}. */ - public static int nviewConfigurationCount(long struct) { return UNSAFE.getInt(null, struct + XrSecondaryViewConfigurationFrameStateMSFT.VIEWCONFIGURATIONCOUNT); } - /** Unsafe version of {@link #viewConfigurationStates}. */ - public static XrSecondaryViewConfigurationStateMSFT.Buffer nviewConfigurationStates(long struct) { return XrSecondaryViewConfigurationStateMSFT.create(memGetAddress(struct + XrSecondaryViewConfigurationFrameStateMSFT.VIEWCONFIGURATIONSTATES), nviewConfigurationCount(struct)); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSecondaryViewConfigurationFrameStateMSFT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSecondaryViewConfigurationFrameStateMSFT.NEXT, value); } - /** Sets the specified value to the {@code viewConfigurationCount} field of the specified {@code struct}. */ - public static void nviewConfigurationCount(long struct, int value) { UNSAFE.putInt(null, struct + XrSecondaryViewConfigurationFrameStateMSFT.VIEWCONFIGURATIONCOUNT, value); } - /** Unsafe version of {@link #viewConfigurationStates(XrSecondaryViewConfigurationStateMSFT.Buffer) viewConfigurationStates}. */ - public static void nviewConfigurationStates(long struct, XrSecondaryViewConfigurationStateMSFT.Buffer value) { memPutAddress(struct + XrSecondaryViewConfigurationFrameStateMSFT.VIEWCONFIGURATIONSTATES, value.address()); nviewConfigurationCount(struct, value.remaining()); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XrSecondaryViewConfigurationFrameStateMSFT.VIEWCONFIGURATIONSTATES)); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrSecondaryViewConfigurationFrameStateMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSecondaryViewConfigurationFrameStateMSFT ELEMENT_FACTORY = XrSecondaryViewConfigurationFrameStateMSFT.create(-1L); - - /** - * Creates a new {@code XrSecondaryViewConfigurationFrameStateMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSecondaryViewConfigurationFrameStateMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSecondaryViewConfigurationFrameStateMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSecondaryViewConfigurationFrameStateMSFT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrSecondaryViewConfigurationFrameStateMSFT.nnext(address()); } - /** @return the value of the {@code viewConfigurationCount} field. */ - @NativeType("uint32_t") - public int viewConfigurationCount() { return XrSecondaryViewConfigurationFrameStateMSFT.nviewConfigurationCount(address()); } - /** @return a {@link XrSecondaryViewConfigurationStateMSFT.Buffer} view of the struct array pointed to by the {@code viewConfigurationStates} field. */ - @NativeType("XrSecondaryViewConfigurationStateMSFT *") - public XrSecondaryViewConfigurationStateMSFT.Buffer viewConfigurationStates() { return XrSecondaryViewConfigurationFrameStateMSFT.nviewConfigurationStates(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSecondaryViewConfigurationFrameStateMSFT.ntype(address(), value); return this; } - /** Sets the {@link MSFTSecondaryViewConfiguration#XR_TYPE_SECONDARY_VIEW_CONFIGURATION_FRAME_STATE_MSFT TYPE_SECONDARY_VIEW_CONFIGURATION_FRAME_STATE_MSFT} value to the {@code type} field. */ - public Buffer type$Default() { return type(MSFTSecondaryViewConfiguration.XR_TYPE_SECONDARY_VIEW_CONFIGURATION_FRAME_STATE_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrSecondaryViewConfigurationFrameStateMSFT.nnext(address(), value); return this; } - /** Sets the address of the specified {@link XrSecondaryViewConfigurationStateMSFT.Buffer} to the {@code viewConfigurationStates} field. */ - public Buffer viewConfigurationStates(@NativeType("XrSecondaryViewConfigurationStateMSFT *") XrSecondaryViewConfigurationStateMSFT.Buffer value) { XrSecondaryViewConfigurationFrameStateMSFT.nviewConfigurationStates(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSecondaryViewConfigurationLayerInfoMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSecondaryViewConfigurationLayerInfoMSFT.java deleted file mode 100644 index 76fadd6f..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSecondaryViewConfigurationLayerInfoMSFT.java +++ /dev/null @@ -1,376 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.PointerBuffer; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSecondaryViewConfigurationLayerInfoMSFT {
- *     XrStructureType type;
- *     void const * next;
- *     XrViewConfigurationType viewConfigurationType;
- *     XrEnvironmentBlendMode environmentBlendMode;
- *     uint32_t layerCount;
- *     {@link XrCompositionLayerBaseHeader XrCompositionLayerBaseHeader} const * const * layers;
- * }
- */ -public class XrSecondaryViewConfigurationLayerInfoMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - VIEWCONFIGURATIONTYPE, - ENVIRONMENTBLENDMODE, - LAYERCOUNT, - LAYERS; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(4), - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - VIEWCONFIGURATIONTYPE = layout.offsetof(2); - ENVIRONMENTBLENDMODE = layout.offsetof(3); - LAYERCOUNT = layout.offsetof(4); - LAYERS = layout.offsetof(5); - } - - /** - * Creates a {@code XrSecondaryViewConfigurationLayerInfoMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSecondaryViewConfigurationLayerInfoMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code viewConfigurationType} field. */ - @NativeType("XrViewConfigurationType") - public int viewConfigurationType() { return nviewConfigurationType(address()); } - /** @return the value of the {@code environmentBlendMode} field. */ - @NativeType("XrEnvironmentBlendMode") - public int environmentBlendMode() { return nenvironmentBlendMode(address()); } - /** @return the value of the {@code layerCount} field. */ - @NativeType("uint32_t") - public int layerCount() { return nlayerCount(address()); } - /** @return a {@link PointerBuffer} view of the data pointed to by the {@code layers} field. */ - @NativeType("XrCompositionLayerBaseHeader const * const *") - public PointerBuffer layers() { return nlayers(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrSecondaryViewConfigurationLayerInfoMSFT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link MSFTSecondaryViewConfiguration#XR_TYPE_SECONDARY_VIEW_CONFIGURATION_LAYER_INFO_MSFT TYPE_SECONDARY_VIEW_CONFIGURATION_LAYER_INFO_MSFT} value to the {@code type} field. */ - public XrSecondaryViewConfigurationLayerInfoMSFT type$Default() { return type(MSFTSecondaryViewConfiguration.XR_TYPE_SECONDARY_VIEW_CONFIGURATION_LAYER_INFO_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public XrSecondaryViewConfigurationLayerInfoMSFT next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code viewConfigurationType} field. */ - public XrSecondaryViewConfigurationLayerInfoMSFT viewConfigurationType(@NativeType("XrViewConfigurationType") int value) { nviewConfigurationType(address(), value); return this; } - /** Sets the specified value to the {@code environmentBlendMode} field. */ - public XrSecondaryViewConfigurationLayerInfoMSFT environmentBlendMode(@NativeType("XrEnvironmentBlendMode") int value) { nenvironmentBlendMode(address(), value); return this; } - /** Sets the address of the specified {@link PointerBuffer} to the {@code layers} field. */ - public XrSecondaryViewConfigurationLayerInfoMSFT layers(@NativeType("XrCompositionLayerBaseHeader const * const *") PointerBuffer value) { nlayers(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrSecondaryViewConfigurationLayerInfoMSFT set( - int type, - long next, - int viewConfigurationType, - int environmentBlendMode, - PointerBuffer layers - ) { - type(type); - next(next); - viewConfigurationType(viewConfigurationType); - environmentBlendMode(environmentBlendMode); - layers(layers); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSecondaryViewConfigurationLayerInfoMSFT set(XrSecondaryViewConfigurationLayerInfoMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSecondaryViewConfigurationLayerInfoMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSecondaryViewConfigurationLayerInfoMSFT malloc() { - return wrap(XrSecondaryViewConfigurationLayerInfoMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSecondaryViewConfigurationLayerInfoMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSecondaryViewConfigurationLayerInfoMSFT calloc() { - return wrap(XrSecondaryViewConfigurationLayerInfoMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSecondaryViewConfigurationLayerInfoMSFT} instance allocated with {@link BufferUtils}. */ - public static XrSecondaryViewConfigurationLayerInfoMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSecondaryViewConfigurationLayerInfoMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrSecondaryViewConfigurationLayerInfoMSFT} instance for the specified memory address. */ - public static XrSecondaryViewConfigurationLayerInfoMSFT create(long address) { - return wrap(XrSecondaryViewConfigurationLayerInfoMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSecondaryViewConfigurationLayerInfoMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrSecondaryViewConfigurationLayerInfoMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSecondaryViewConfigurationLayerInfoMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSecondaryViewConfigurationLayerInfoMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSecondaryViewConfigurationLayerInfoMSFT malloc(MemoryStack stack) { - return wrap(XrSecondaryViewConfigurationLayerInfoMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSecondaryViewConfigurationLayerInfoMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSecondaryViewConfigurationLayerInfoMSFT calloc(MemoryStack stack) { - return wrap(XrSecondaryViewConfigurationLayerInfoMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSecondaryViewConfigurationLayerInfoMSFT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSecondaryViewConfigurationLayerInfoMSFT.NEXT); } - /** Unsafe version of {@link #viewConfigurationType}. */ - public static int nviewConfigurationType(long struct) { return UNSAFE.getInt(null, struct + XrSecondaryViewConfigurationLayerInfoMSFT.VIEWCONFIGURATIONTYPE); } - /** Unsafe version of {@link #environmentBlendMode}. */ - public static int nenvironmentBlendMode(long struct) { return UNSAFE.getInt(null, struct + XrSecondaryViewConfigurationLayerInfoMSFT.ENVIRONMENTBLENDMODE); } - /** Unsafe version of {@link #layerCount}. */ - public static int nlayerCount(long struct) { return UNSAFE.getInt(null, struct + XrSecondaryViewConfigurationLayerInfoMSFT.LAYERCOUNT); } - /** Unsafe version of {@link #layers() layers}. */ - public static PointerBuffer nlayers(long struct) { return memPointerBuffer(memGetAddress(struct + XrSecondaryViewConfigurationLayerInfoMSFT.LAYERS), nlayerCount(struct)); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSecondaryViewConfigurationLayerInfoMSFT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSecondaryViewConfigurationLayerInfoMSFT.NEXT, value); } - /** Unsafe version of {@link #viewConfigurationType(int) viewConfigurationType}. */ - public static void nviewConfigurationType(long struct, int value) { UNSAFE.putInt(null, struct + XrSecondaryViewConfigurationLayerInfoMSFT.VIEWCONFIGURATIONTYPE, value); } - /** Unsafe version of {@link #environmentBlendMode(int) environmentBlendMode}. */ - public static void nenvironmentBlendMode(long struct, int value) { UNSAFE.putInt(null, struct + XrSecondaryViewConfigurationLayerInfoMSFT.ENVIRONMENTBLENDMODE, value); } - /** Sets the specified value to the {@code layerCount} field of the specified {@code struct}. */ - public static void nlayerCount(long struct, int value) { UNSAFE.putInt(null, struct + XrSecondaryViewConfigurationLayerInfoMSFT.LAYERCOUNT, value); } - /** Unsafe version of {@link #layers(PointerBuffer) layers}. */ - public static void nlayers(long struct, PointerBuffer value) { memPutAddress(struct + XrSecondaryViewConfigurationLayerInfoMSFT.LAYERS, memAddress(value)); nlayerCount(struct, value.remaining()); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XrSecondaryViewConfigurationLayerInfoMSFT.LAYERS)); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrSecondaryViewConfigurationLayerInfoMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSecondaryViewConfigurationLayerInfoMSFT ELEMENT_FACTORY = XrSecondaryViewConfigurationLayerInfoMSFT.create(-1L); - - /** - * Creates a new {@code XrSecondaryViewConfigurationLayerInfoMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSecondaryViewConfigurationLayerInfoMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSecondaryViewConfigurationLayerInfoMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSecondaryViewConfigurationLayerInfoMSFT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrSecondaryViewConfigurationLayerInfoMSFT.nnext(address()); } - /** @return the value of the {@code viewConfigurationType} field. */ - @NativeType("XrViewConfigurationType") - public int viewConfigurationType() { return XrSecondaryViewConfigurationLayerInfoMSFT.nviewConfigurationType(address()); } - /** @return the value of the {@code environmentBlendMode} field. */ - @NativeType("XrEnvironmentBlendMode") - public int environmentBlendMode() { return XrSecondaryViewConfigurationLayerInfoMSFT.nenvironmentBlendMode(address()); } - /** @return the value of the {@code layerCount} field. */ - @NativeType("uint32_t") - public int layerCount() { return XrSecondaryViewConfigurationLayerInfoMSFT.nlayerCount(address()); } - /** @return a {@link PointerBuffer} view of the data pointed to by the {@code layers} field. */ - @NativeType("XrCompositionLayerBaseHeader const * const *") - public PointerBuffer layers() { return XrSecondaryViewConfigurationLayerInfoMSFT.nlayers(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSecondaryViewConfigurationLayerInfoMSFT.ntype(address(), value); return this; } - /** Sets the {@link MSFTSecondaryViewConfiguration#XR_TYPE_SECONDARY_VIEW_CONFIGURATION_LAYER_INFO_MSFT TYPE_SECONDARY_VIEW_CONFIGURATION_LAYER_INFO_MSFT} value to the {@code type} field. */ - public Buffer type$Default() { return type(MSFTSecondaryViewConfiguration.XR_TYPE_SECONDARY_VIEW_CONFIGURATION_LAYER_INFO_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrSecondaryViewConfigurationLayerInfoMSFT.nnext(address(), value); return this; } - /** Sets the specified value to the {@code viewConfigurationType} field. */ - public Buffer viewConfigurationType(@NativeType("XrViewConfigurationType") int value) { XrSecondaryViewConfigurationLayerInfoMSFT.nviewConfigurationType(address(), value); return this; } - /** Sets the specified value to the {@code environmentBlendMode} field. */ - public Buffer environmentBlendMode(@NativeType("XrEnvironmentBlendMode") int value) { XrSecondaryViewConfigurationLayerInfoMSFT.nenvironmentBlendMode(address(), value); return this; } - /** Sets the address of the specified {@link PointerBuffer} to the {@code layers} field. */ - public Buffer layers(@NativeType("XrCompositionLayerBaseHeader const * const *") PointerBuffer value) { XrSecondaryViewConfigurationLayerInfoMSFT.nlayers(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSecondaryViewConfigurationSessionBeginInfoMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSecondaryViewConfigurationSessionBeginInfoMSFT.java deleted file mode 100644 index a0b2ab43..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSecondaryViewConfigurationSessionBeginInfoMSFT.java +++ /dev/null @@ -1,336 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; -import java.nio.IntBuffer; - -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSecondaryViewConfigurationSessionBeginInfoMSFT {
- *     XrStructureType type;
- *     void const * next;
- *     uint32_t viewConfigurationCount;
- *     XrViewConfigurationType const * enabledViewConfigurationTypes;
- * }
- */ -public class XrSecondaryViewConfigurationSessionBeginInfoMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - VIEWCONFIGURATIONCOUNT, - ENABLEDVIEWCONFIGURATIONTYPES; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - VIEWCONFIGURATIONCOUNT = layout.offsetof(2); - ENABLEDVIEWCONFIGURATIONTYPES = layout.offsetof(3); - } - - /** - * Creates a {@code XrSecondaryViewConfigurationSessionBeginInfoMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSecondaryViewConfigurationSessionBeginInfoMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code viewConfigurationCount} field. */ - @NativeType("uint32_t") - public int viewConfigurationCount() { return nviewConfigurationCount(address()); } - /** @return a {@link IntBuffer} view of the data pointed to by the {@code enabledViewConfigurationTypes} field. */ - @NativeType("XrViewConfigurationType const *") - public IntBuffer enabledViewConfigurationTypes() { return nenabledViewConfigurationTypes(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrSecondaryViewConfigurationSessionBeginInfoMSFT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link MSFTSecondaryViewConfiguration#XR_TYPE_SECONDARY_VIEW_CONFIGURATION_SESSION_BEGIN_INFO_MSFT TYPE_SECONDARY_VIEW_CONFIGURATION_SESSION_BEGIN_INFO_MSFT} value to the {@code type} field. */ - public XrSecondaryViewConfigurationSessionBeginInfoMSFT type$Default() { return type(MSFTSecondaryViewConfiguration.XR_TYPE_SECONDARY_VIEW_CONFIGURATION_SESSION_BEGIN_INFO_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public XrSecondaryViewConfigurationSessionBeginInfoMSFT next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the address of the specified {@link IntBuffer} to the {@code enabledViewConfigurationTypes} field. */ - public XrSecondaryViewConfigurationSessionBeginInfoMSFT enabledViewConfigurationTypes(@NativeType("XrViewConfigurationType const *") IntBuffer value) { nenabledViewConfigurationTypes(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrSecondaryViewConfigurationSessionBeginInfoMSFT set( - int type, - long next, - IntBuffer enabledViewConfigurationTypes - ) { - type(type); - next(next); - enabledViewConfigurationTypes(enabledViewConfigurationTypes); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSecondaryViewConfigurationSessionBeginInfoMSFT set(XrSecondaryViewConfigurationSessionBeginInfoMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSecondaryViewConfigurationSessionBeginInfoMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSecondaryViewConfigurationSessionBeginInfoMSFT malloc() { - return wrap(XrSecondaryViewConfigurationSessionBeginInfoMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSecondaryViewConfigurationSessionBeginInfoMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSecondaryViewConfigurationSessionBeginInfoMSFT calloc() { - return wrap(XrSecondaryViewConfigurationSessionBeginInfoMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSecondaryViewConfigurationSessionBeginInfoMSFT} instance allocated with {@link BufferUtils}. */ - public static XrSecondaryViewConfigurationSessionBeginInfoMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSecondaryViewConfigurationSessionBeginInfoMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrSecondaryViewConfigurationSessionBeginInfoMSFT} instance for the specified memory address. */ - public static XrSecondaryViewConfigurationSessionBeginInfoMSFT create(long address) { - return wrap(XrSecondaryViewConfigurationSessionBeginInfoMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSecondaryViewConfigurationSessionBeginInfoMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrSecondaryViewConfigurationSessionBeginInfoMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSecondaryViewConfigurationSessionBeginInfoMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSecondaryViewConfigurationSessionBeginInfoMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSecondaryViewConfigurationSessionBeginInfoMSFT malloc(MemoryStack stack) { - return wrap(XrSecondaryViewConfigurationSessionBeginInfoMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSecondaryViewConfigurationSessionBeginInfoMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSecondaryViewConfigurationSessionBeginInfoMSFT calloc(MemoryStack stack) { - return wrap(XrSecondaryViewConfigurationSessionBeginInfoMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSecondaryViewConfigurationSessionBeginInfoMSFT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSecondaryViewConfigurationSessionBeginInfoMSFT.NEXT); } - /** Unsafe version of {@link #viewConfigurationCount}. */ - public static int nviewConfigurationCount(long struct) { return UNSAFE.getInt(null, struct + XrSecondaryViewConfigurationSessionBeginInfoMSFT.VIEWCONFIGURATIONCOUNT); } - /** Unsafe version of {@link #enabledViewConfigurationTypes() enabledViewConfigurationTypes}. */ - public static IntBuffer nenabledViewConfigurationTypes(long struct) { return memIntBuffer(memGetAddress(struct + XrSecondaryViewConfigurationSessionBeginInfoMSFT.ENABLEDVIEWCONFIGURATIONTYPES), nviewConfigurationCount(struct)); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSecondaryViewConfigurationSessionBeginInfoMSFT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSecondaryViewConfigurationSessionBeginInfoMSFT.NEXT, value); } - /** Sets the specified value to the {@code viewConfigurationCount} field of the specified {@code struct}. */ - public static void nviewConfigurationCount(long struct, int value) { UNSAFE.putInt(null, struct + XrSecondaryViewConfigurationSessionBeginInfoMSFT.VIEWCONFIGURATIONCOUNT, value); } - /** Unsafe version of {@link #enabledViewConfigurationTypes(IntBuffer) enabledViewConfigurationTypes}. */ - public static void nenabledViewConfigurationTypes(long struct, IntBuffer value) { memPutAddress(struct + XrSecondaryViewConfigurationSessionBeginInfoMSFT.ENABLEDVIEWCONFIGURATIONTYPES, memAddress(value)); nviewConfigurationCount(struct, value.remaining()); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XrSecondaryViewConfigurationSessionBeginInfoMSFT.ENABLEDVIEWCONFIGURATIONTYPES)); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrSecondaryViewConfigurationSessionBeginInfoMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSecondaryViewConfigurationSessionBeginInfoMSFT ELEMENT_FACTORY = XrSecondaryViewConfigurationSessionBeginInfoMSFT.create(-1L); - - /** - * Creates a new {@code XrSecondaryViewConfigurationSessionBeginInfoMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSecondaryViewConfigurationSessionBeginInfoMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSecondaryViewConfigurationSessionBeginInfoMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSecondaryViewConfigurationSessionBeginInfoMSFT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrSecondaryViewConfigurationSessionBeginInfoMSFT.nnext(address()); } - /** @return the value of the {@code viewConfigurationCount} field. */ - @NativeType("uint32_t") - public int viewConfigurationCount() { return XrSecondaryViewConfigurationSessionBeginInfoMSFT.nviewConfigurationCount(address()); } - /** @return a {@link IntBuffer} view of the data pointed to by the {@code enabledViewConfigurationTypes} field. */ - @NativeType("XrViewConfigurationType const *") - public IntBuffer enabledViewConfigurationTypes() { return XrSecondaryViewConfigurationSessionBeginInfoMSFT.nenabledViewConfigurationTypes(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSecondaryViewConfigurationSessionBeginInfoMSFT.ntype(address(), value); return this; } - /** Sets the {@link MSFTSecondaryViewConfiguration#XR_TYPE_SECONDARY_VIEW_CONFIGURATION_SESSION_BEGIN_INFO_MSFT TYPE_SECONDARY_VIEW_CONFIGURATION_SESSION_BEGIN_INFO_MSFT} value to the {@code type} field. */ - public Buffer type$Default() { return type(MSFTSecondaryViewConfiguration.XR_TYPE_SECONDARY_VIEW_CONFIGURATION_SESSION_BEGIN_INFO_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrSecondaryViewConfigurationSessionBeginInfoMSFT.nnext(address(), value); return this; } - /** Sets the address of the specified {@link IntBuffer} to the {@code enabledViewConfigurationTypes} field. */ - public Buffer enabledViewConfigurationTypes(@NativeType("XrViewConfigurationType const *") IntBuffer value) { XrSecondaryViewConfigurationSessionBeginInfoMSFT.nenabledViewConfigurationTypes(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSecondaryViewConfigurationStateMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSecondaryViewConfigurationStateMSFT.java deleted file mode 100644 index c602eb11..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSecondaryViewConfigurationStateMSFT.java +++ /dev/null @@ -1,319 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSecondaryViewConfigurationStateMSFT {
- *     XrStructureType type;
- *     void * next;
- *     XrViewConfigurationType viewConfigurationType;
- *     XrBool32 active;
- * }
- */ -public class XrSecondaryViewConfigurationStateMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - VIEWCONFIGURATIONTYPE, - ACTIVE; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - VIEWCONFIGURATIONTYPE = layout.offsetof(2); - ACTIVE = layout.offsetof(3); - } - - /** - * Creates a {@code XrSecondaryViewConfigurationStateMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSecondaryViewConfigurationStateMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return the value of the {@code viewConfigurationType} field. */ - @NativeType("XrViewConfigurationType") - public int viewConfigurationType() { return nviewConfigurationType(address()); } - /** @return the value of the {@code active} field. */ - @NativeType("XrBool32") - public boolean active() { return nactive(address()) != 0; } - - /** Sets the specified value to the {@code type} field. */ - public XrSecondaryViewConfigurationStateMSFT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link MSFTSecondaryViewConfiguration#XR_TYPE_SECONDARY_VIEW_CONFIGURATION_STATE_MSFT TYPE_SECONDARY_VIEW_CONFIGURATION_STATE_MSFT} value to the {@code type} field. */ - public XrSecondaryViewConfigurationStateMSFT type$Default() { return type(MSFTSecondaryViewConfiguration.XR_TYPE_SECONDARY_VIEW_CONFIGURATION_STATE_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public XrSecondaryViewConfigurationStateMSFT next(@NativeType("void *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code viewConfigurationType} field. */ - public XrSecondaryViewConfigurationStateMSFT viewConfigurationType(@NativeType("XrViewConfigurationType") int value) { nviewConfigurationType(address(), value); return this; } - /** Sets the specified value to the {@code active} field. */ - public XrSecondaryViewConfigurationStateMSFT active(@NativeType("XrBool32") boolean value) { nactive(address(), value ? 1 : 0); return this; } - - /** Initializes this struct with the specified values. */ - public XrSecondaryViewConfigurationStateMSFT set( - int type, - long next, - int viewConfigurationType, - boolean active - ) { - type(type); - next(next); - viewConfigurationType(viewConfigurationType); - active(active); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSecondaryViewConfigurationStateMSFT set(XrSecondaryViewConfigurationStateMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSecondaryViewConfigurationStateMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSecondaryViewConfigurationStateMSFT malloc() { - return wrap(XrSecondaryViewConfigurationStateMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSecondaryViewConfigurationStateMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSecondaryViewConfigurationStateMSFT calloc() { - return wrap(XrSecondaryViewConfigurationStateMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSecondaryViewConfigurationStateMSFT} instance allocated with {@link BufferUtils}. */ - public static XrSecondaryViewConfigurationStateMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSecondaryViewConfigurationStateMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrSecondaryViewConfigurationStateMSFT} instance for the specified memory address. */ - public static XrSecondaryViewConfigurationStateMSFT create(long address) { - return wrap(XrSecondaryViewConfigurationStateMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSecondaryViewConfigurationStateMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrSecondaryViewConfigurationStateMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSecondaryViewConfigurationStateMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSecondaryViewConfigurationStateMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSecondaryViewConfigurationStateMSFT malloc(MemoryStack stack) { - return wrap(XrSecondaryViewConfigurationStateMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSecondaryViewConfigurationStateMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSecondaryViewConfigurationStateMSFT calloc(MemoryStack stack) { - return wrap(XrSecondaryViewConfigurationStateMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSecondaryViewConfigurationStateMSFT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSecondaryViewConfigurationStateMSFT.NEXT); } - /** Unsafe version of {@link #viewConfigurationType}. */ - public static int nviewConfigurationType(long struct) { return UNSAFE.getInt(null, struct + XrSecondaryViewConfigurationStateMSFT.VIEWCONFIGURATIONTYPE); } - /** Unsafe version of {@link #active}. */ - public static int nactive(long struct) { return UNSAFE.getInt(null, struct + XrSecondaryViewConfigurationStateMSFT.ACTIVE); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSecondaryViewConfigurationStateMSFT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSecondaryViewConfigurationStateMSFT.NEXT, value); } - /** Unsafe version of {@link #viewConfigurationType(int) viewConfigurationType}. */ - public static void nviewConfigurationType(long struct, int value) { UNSAFE.putInt(null, struct + XrSecondaryViewConfigurationStateMSFT.VIEWCONFIGURATIONTYPE, value); } - /** Unsafe version of {@link #active(boolean) active}. */ - public static void nactive(long struct, int value) { UNSAFE.putInt(null, struct + XrSecondaryViewConfigurationStateMSFT.ACTIVE, value); } - - // ----------------------------------- - - /** An array of {@link XrSecondaryViewConfigurationStateMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSecondaryViewConfigurationStateMSFT ELEMENT_FACTORY = XrSecondaryViewConfigurationStateMSFT.create(-1L); - - /** - * Creates a new {@code XrSecondaryViewConfigurationStateMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSecondaryViewConfigurationStateMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSecondaryViewConfigurationStateMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSecondaryViewConfigurationStateMSFT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrSecondaryViewConfigurationStateMSFT.nnext(address()); } - /** @return the value of the {@code viewConfigurationType} field. */ - @NativeType("XrViewConfigurationType") - public int viewConfigurationType() { return XrSecondaryViewConfigurationStateMSFT.nviewConfigurationType(address()); } - /** @return the value of the {@code active} field. */ - @NativeType("XrBool32") - public boolean active() { return XrSecondaryViewConfigurationStateMSFT.nactive(address()) != 0; } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSecondaryViewConfigurationStateMSFT.ntype(address(), value); return this; } - /** Sets the {@link MSFTSecondaryViewConfiguration#XR_TYPE_SECONDARY_VIEW_CONFIGURATION_STATE_MSFT TYPE_SECONDARY_VIEW_CONFIGURATION_STATE_MSFT} value to the {@code type} field. */ - public Buffer type$Default() { return type(MSFTSecondaryViewConfiguration.XR_TYPE_SECONDARY_VIEW_CONFIGURATION_STATE_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrSecondaryViewConfigurationStateMSFT.nnext(address(), value); return this; } - /** Sets the specified value to the {@code viewConfigurationType} field. */ - public Buffer viewConfigurationType(@NativeType("XrViewConfigurationType") int value) { XrSecondaryViewConfigurationStateMSFT.nviewConfigurationType(address(), value); return this; } - /** Sets the specified value to the {@code active} field. */ - public Buffer active(@NativeType("XrBool32") boolean value) { XrSecondaryViewConfigurationStateMSFT.nactive(address(), value ? 1 : 0); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSecondaryViewConfigurationSwapchainCreateInfoMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSecondaryViewConfigurationSwapchainCreateInfoMSFT.java deleted file mode 100644 index 23bd6cf1..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSecondaryViewConfigurationSwapchainCreateInfoMSFT.java +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSecondaryViewConfigurationSwapchainCreateInfoMSFT {
- *     XrStructureType type;
- *     void const * next;
- *     XrViewConfigurationType viewConfigurationType;
- * }
- */ -public class XrSecondaryViewConfigurationSwapchainCreateInfoMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - VIEWCONFIGURATIONTYPE; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - VIEWCONFIGURATIONTYPE = layout.offsetof(2); - } - - /** - * Creates a {@code XrSecondaryViewConfigurationSwapchainCreateInfoMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSecondaryViewConfigurationSwapchainCreateInfoMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code viewConfigurationType} field. */ - @NativeType("XrViewConfigurationType") - public int viewConfigurationType() { return nviewConfigurationType(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrSecondaryViewConfigurationSwapchainCreateInfoMSFT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link MSFTSecondaryViewConfiguration#XR_TYPE_SECONDARY_VIEW_CONFIGURATION_SWAPCHAIN_CREATE_INFO_MSFT TYPE_SECONDARY_VIEW_CONFIGURATION_SWAPCHAIN_CREATE_INFO_MSFT} value to the {@code type} field. */ - public XrSecondaryViewConfigurationSwapchainCreateInfoMSFT type$Default() { return type(MSFTSecondaryViewConfiguration.XR_TYPE_SECONDARY_VIEW_CONFIGURATION_SWAPCHAIN_CREATE_INFO_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public XrSecondaryViewConfigurationSwapchainCreateInfoMSFT next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code viewConfigurationType} field. */ - public XrSecondaryViewConfigurationSwapchainCreateInfoMSFT viewConfigurationType(@NativeType("XrViewConfigurationType") int value) { nviewConfigurationType(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrSecondaryViewConfigurationSwapchainCreateInfoMSFT set( - int type, - long next, - int viewConfigurationType - ) { - type(type); - next(next); - viewConfigurationType(viewConfigurationType); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSecondaryViewConfigurationSwapchainCreateInfoMSFT set(XrSecondaryViewConfigurationSwapchainCreateInfoMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSecondaryViewConfigurationSwapchainCreateInfoMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSecondaryViewConfigurationSwapchainCreateInfoMSFT malloc() { - return wrap(XrSecondaryViewConfigurationSwapchainCreateInfoMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSecondaryViewConfigurationSwapchainCreateInfoMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSecondaryViewConfigurationSwapchainCreateInfoMSFT calloc() { - return wrap(XrSecondaryViewConfigurationSwapchainCreateInfoMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSecondaryViewConfigurationSwapchainCreateInfoMSFT} instance allocated with {@link BufferUtils}. */ - public static XrSecondaryViewConfigurationSwapchainCreateInfoMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSecondaryViewConfigurationSwapchainCreateInfoMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrSecondaryViewConfigurationSwapchainCreateInfoMSFT} instance for the specified memory address. */ - public static XrSecondaryViewConfigurationSwapchainCreateInfoMSFT create(long address) { - return wrap(XrSecondaryViewConfigurationSwapchainCreateInfoMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSecondaryViewConfigurationSwapchainCreateInfoMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrSecondaryViewConfigurationSwapchainCreateInfoMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSecondaryViewConfigurationSwapchainCreateInfoMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSecondaryViewConfigurationSwapchainCreateInfoMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSecondaryViewConfigurationSwapchainCreateInfoMSFT malloc(MemoryStack stack) { - return wrap(XrSecondaryViewConfigurationSwapchainCreateInfoMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSecondaryViewConfigurationSwapchainCreateInfoMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSecondaryViewConfigurationSwapchainCreateInfoMSFT calloc(MemoryStack stack) { - return wrap(XrSecondaryViewConfigurationSwapchainCreateInfoMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSecondaryViewConfigurationSwapchainCreateInfoMSFT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSecondaryViewConfigurationSwapchainCreateInfoMSFT.NEXT); } - /** Unsafe version of {@link #viewConfigurationType}. */ - public static int nviewConfigurationType(long struct) { return UNSAFE.getInt(null, struct + XrSecondaryViewConfigurationSwapchainCreateInfoMSFT.VIEWCONFIGURATIONTYPE); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSecondaryViewConfigurationSwapchainCreateInfoMSFT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSecondaryViewConfigurationSwapchainCreateInfoMSFT.NEXT, value); } - /** Unsafe version of {@link #viewConfigurationType(int) viewConfigurationType}. */ - public static void nviewConfigurationType(long struct, int value) { UNSAFE.putInt(null, struct + XrSecondaryViewConfigurationSwapchainCreateInfoMSFT.VIEWCONFIGURATIONTYPE, value); } - - // ----------------------------------- - - /** An array of {@link XrSecondaryViewConfigurationSwapchainCreateInfoMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSecondaryViewConfigurationSwapchainCreateInfoMSFT ELEMENT_FACTORY = XrSecondaryViewConfigurationSwapchainCreateInfoMSFT.create(-1L); - - /** - * Creates a new {@code XrSecondaryViewConfigurationSwapchainCreateInfoMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSecondaryViewConfigurationSwapchainCreateInfoMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSecondaryViewConfigurationSwapchainCreateInfoMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSecondaryViewConfigurationSwapchainCreateInfoMSFT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrSecondaryViewConfigurationSwapchainCreateInfoMSFT.nnext(address()); } - /** @return the value of the {@code viewConfigurationType} field. */ - @NativeType("XrViewConfigurationType") - public int viewConfigurationType() { return XrSecondaryViewConfigurationSwapchainCreateInfoMSFT.nviewConfigurationType(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSecondaryViewConfigurationSwapchainCreateInfoMSFT.ntype(address(), value); return this; } - /** Sets the {@link MSFTSecondaryViewConfiguration#XR_TYPE_SECONDARY_VIEW_CONFIGURATION_SWAPCHAIN_CREATE_INFO_MSFT TYPE_SECONDARY_VIEW_CONFIGURATION_SWAPCHAIN_CREATE_INFO_MSFT} value to the {@code type} field. */ - public Buffer type$Default() { return type(MSFTSecondaryViewConfiguration.XR_TYPE_SECONDARY_VIEW_CONFIGURATION_SWAPCHAIN_CREATE_INFO_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrSecondaryViewConfigurationSwapchainCreateInfoMSFT.nnext(address(), value); return this; } - /** Sets the specified value to the {@code viewConfigurationType} field. */ - public Buffer viewConfigurationType(@NativeType("XrViewConfigurationType") int value) { XrSecondaryViewConfigurationSwapchainCreateInfoMSFT.nviewConfigurationType(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSerializedSceneFragmentDataGetInfoMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSerializedSceneFragmentDataGetInfoMSFT.java deleted file mode 100644 index 64ba5032..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSerializedSceneFragmentDataGetInfoMSFT.java +++ /dev/null @@ -1,301 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSerializedSceneFragmentDataGetInfoMSFT {
- *     XrStructureType type;
- *     void const * next;
- *     {@link XrUuidMSFT XrUuidMSFT} sceneFragmentId;
- * }
- */ -public class XrSerializedSceneFragmentDataGetInfoMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - SCENEFRAGMENTID; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(XrUuidMSFT.SIZEOF, XrUuidMSFT.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - SCENEFRAGMENTID = layout.offsetof(2); - } - - /** - * Creates a {@code XrSerializedSceneFragmentDataGetInfoMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSerializedSceneFragmentDataGetInfoMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return a {@link XrUuidMSFT} view of the {@code sceneFragmentId} field. */ - public XrUuidMSFT sceneFragmentId() { return nsceneFragmentId(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrSerializedSceneFragmentDataGetInfoMSFT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link MSFTSceneUnderstandingSerialization#XR_TYPE_SERIALIZED_SCENE_FRAGMENT_DATA_GET_INFO_MSFT TYPE_SERIALIZED_SCENE_FRAGMENT_DATA_GET_INFO_MSFT} value to the {@code type} field. */ - public XrSerializedSceneFragmentDataGetInfoMSFT type$Default() { return type(MSFTSceneUnderstandingSerialization.XR_TYPE_SERIALIZED_SCENE_FRAGMENT_DATA_GET_INFO_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public XrSerializedSceneFragmentDataGetInfoMSFT next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Copies the specified {@link XrUuidMSFT} to the {@code sceneFragmentId} field. */ - public XrSerializedSceneFragmentDataGetInfoMSFT sceneFragmentId(XrUuidMSFT value) { nsceneFragmentId(address(), value); return this; } - /** Passes the {@code sceneFragmentId} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrSerializedSceneFragmentDataGetInfoMSFT sceneFragmentId(java.util.function.Consumer consumer) { consumer.accept(sceneFragmentId()); return this; } - - /** Initializes this struct with the specified values. */ - public XrSerializedSceneFragmentDataGetInfoMSFT set( - int type, - long next, - XrUuidMSFT sceneFragmentId - ) { - type(type); - next(next); - sceneFragmentId(sceneFragmentId); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSerializedSceneFragmentDataGetInfoMSFT set(XrSerializedSceneFragmentDataGetInfoMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSerializedSceneFragmentDataGetInfoMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSerializedSceneFragmentDataGetInfoMSFT malloc() { - return wrap(XrSerializedSceneFragmentDataGetInfoMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSerializedSceneFragmentDataGetInfoMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSerializedSceneFragmentDataGetInfoMSFT calloc() { - return wrap(XrSerializedSceneFragmentDataGetInfoMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSerializedSceneFragmentDataGetInfoMSFT} instance allocated with {@link BufferUtils}. */ - public static XrSerializedSceneFragmentDataGetInfoMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSerializedSceneFragmentDataGetInfoMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrSerializedSceneFragmentDataGetInfoMSFT} instance for the specified memory address. */ - public static XrSerializedSceneFragmentDataGetInfoMSFT create(long address) { - return wrap(XrSerializedSceneFragmentDataGetInfoMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSerializedSceneFragmentDataGetInfoMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrSerializedSceneFragmentDataGetInfoMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSerializedSceneFragmentDataGetInfoMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSerializedSceneFragmentDataGetInfoMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSerializedSceneFragmentDataGetInfoMSFT malloc(MemoryStack stack) { - return wrap(XrSerializedSceneFragmentDataGetInfoMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSerializedSceneFragmentDataGetInfoMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSerializedSceneFragmentDataGetInfoMSFT calloc(MemoryStack stack) { - return wrap(XrSerializedSceneFragmentDataGetInfoMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSerializedSceneFragmentDataGetInfoMSFT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSerializedSceneFragmentDataGetInfoMSFT.NEXT); } - /** Unsafe version of {@link #sceneFragmentId}. */ - public static XrUuidMSFT nsceneFragmentId(long struct) { return XrUuidMSFT.create(struct + XrSerializedSceneFragmentDataGetInfoMSFT.SCENEFRAGMENTID); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSerializedSceneFragmentDataGetInfoMSFT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSerializedSceneFragmentDataGetInfoMSFT.NEXT, value); } - /** Unsafe version of {@link #sceneFragmentId(XrUuidMSFT) sceneFragmentId}. */ - public static void nsceneFragmentId(long struct, XrUuidMSFT value) { memCopy(value.address(), struct + XrSerializedSceneFragmentDataGetInfoMSFT.SCENEFRAGMENTID, XrUuidMSFT.SIZEOF); } - - // ----------------------------------- - - /** An array of {@link XrSerializedSceneFragmentDataGetInfoMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSerializedSceneFragmentDataGetInfoMSFT ELEMENT_FACTORY = XrSerializedSceneFragmentDataGetInfoMSFT.create(-1L); - - /** - * Creates a new {@code XrSerializedSceneFragmentDataGetInfoMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSerializedSceneFragmentDataGetInfoMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSerializedSceneFragmentDataGetInfoMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSerializedSceneFragmentDataGetInfoMSFT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrSerializedSceneFragmentDataGetInfoMSFT.nnext(address()); } - /** @return a {@link XrUuidMSFT} view of the {@code sceneFragmentId} field. */ - public XrUuidMSFT sceneFragmentId() { return XrSerializedSceneFragmentDataGetInfoMSFT.nsceneFragmentId(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSerializedSceneFragmentDataGetInfoMSFT.ntype(address(), value); return this; } - /** Sets the {@link MSFTSceneUnderstandingSerialization#XR_TYPE_SERIALIZED_SCENE_FRAGMENT_DATA_GET_INFO_MSFT TYPE_SERIALIZED_SCENE_FRAGMENT_DATA_GET_INFO_MSFT} value to the {@code type} field. */ - public Buffer type$Default() { return type(MSFTSceneUnderstandingSerialization.XR_TYPE_SERIALIZED_SCENE_FRAGMENT_DATA_GET_INFO_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrSerializedSceneFragmentDataGetInfoMSFT.nnext(address(), value); return this; } - /** Copies the specified {@link XrUuidMSFT} to the {@code sceneFragmentId} field. */ - public Buffer sceneFragmentId(XrUuidMSFT value) { XrSerializedSceneFragmentDataGetInfoMSFT.nsceneFragmentId(address(), value); return this; } - /** Passes the {@code sceneFragmentId} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer sceneFragmentId(java.util.function.Consumer consumer) { consumer.accept(sceneFragmentId()); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSession.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSession.java deleted file mode 100644 index e0868e40..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSession.java +++ /dev/null @@ -1,11 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.openxr; - -public class XrSession extends DispatchableHandle { - public XrSession(long handle, DispatchableHandle xrInstance) { - super(handle, xrInstance.getCapabilities()); - } -} diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSessionActionSetsAttachInfo.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSessionActionSetsAttachInfo.java deleted file mode 100644 index d28e739b..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSessionActionSetsAttachInfo.java +++ /dev/null @@ -1,336 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.PointerBuffer; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSessionActionSetsAttachInfo {
- *     XrStructureType type;
- *     void const * next;
- *     uint32_t countActionSets;
- *     XrActionSet const * actionSets;
- * }
- */ -public class XrSessionActionSetsAttachInfo extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - COUNTACTIONSETS, - ACTIONSETS; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - COUNTACTIONSETS = layout.offsetof(2); - ACTIONSETS = layout.offsetof(3); - } - - /** - * Creates a {@code XrSessionActionSetsAttachInfo} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSessionActionSetsAttachInfo(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code countActionSets} field. */ - @NativeType("uint32_t") - public int countActionSets() { return ncountActionSets(address()); } - /** @return a {@link PointerBuffer} view of the data pointed to by the {@code actionSets} field. */ - @NativeType("XrActionSet const *") - public PointerBuffer actionSets() { return nactionSets(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrSessionActionSetsAttachInfo type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_SESSION_ACTION_SETS_ATTACH_INFO TYPE_SESSION_ACTION_SETS_ATTACH_INFO} value to the {@code type} field. */ - public XrSessionActionSetsAttachInfo type$Default() { return type(XR10.XR_TYPE_SESSION_ACTION_SETS_ATTACH_INFO); } - /** Sets the specified value to the {@code next} field. */ - public XrSessionActionSetsAttachInfo next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the address of the specified {@link PointerBuffer} to the {@code actionSets} field. */ - public XrSessionActionSetsAttachInfo actionSets(@NativeType("XrActionSet const *") PointerBuffer value) { nactionSets(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrSessionActionSetsAttachInfo set( - int type, - long next, - PointerBuffer actionSets - ) { - type(type); - next(next); - actionSets(actionSets); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSessionActionSetsAttachInfo set(XrSessionActionSetsAttachInfo src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSessionActionSetsAttachInfo} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSessionActionSetsAttachInfo malloc() { - return wrap(XrSessionActionSetsAttachInfo.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSessionActionSetsAttachInfo} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSessionActionSetsAttachInfo calloc() { - return wrap(XrSessionActionSetsAttachInfo.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSessionActionSetsAttachInfo} instance allocated with {@link BufferUtils}. */ - public static XrSessionActionSetsAttachInfo create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSessionActionSetsAttachInfo.class, memAddress(container), container); - } - - /** Returns a new {@code XrSessionActionSetsAttachInfo} instance for the specified memory address. */ - public static XrSessionActionSetsAttachInfo create(long address) { - return wrap(XrSessionActionSetsAttachInfo.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSessionActionSetsAttachInfo createSafe(long address) { - return address == NULL ? null : wrap(XrSessionActionSetsAttachInfo.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSessionActionSetsAttachInfo.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSessionActionSetsAttachInfo} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSessionActionSetsAttachInfo malloc(MemoryStack stack) { - return wrap(XrSessionActionSetsAttachInfo.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSessionActionSetsAttachInfo} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSessionActionSetsAttachInfo calloc(MemoryStack stack) { - return wrap(XrSessionActionSetsAttachInfo.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSessionActionSetsAttachInfo.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSessionActionSetsAttachInfo.NEXT); } - /** Unsafe version of {@link #countActionSets}. */ - public static int ncountActionSets(long struct) { return UNSAFE.getInt(null, struct + XrSessionActionSetsAttachInfo.COUNTACTIONSETS); } - /** Unsafe version of {@link #actionSets() actionSets}. */ - public static PointerBuffer nactionSets(long struct) { return memPointerBuffer(memGetAddress(struct + XrSessionActionSetsAttachInfo.ACTIONSETS), ncountActionSets(struct)); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSessionActionSetsAttachInfo.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSessionActionSetsAttachInfo.NEXT, value); } - /** Sets the specified value to the {@code countActionSets} field of the specified {@code struct}. */ - public static void ncountActionSets(long struct, int value) { UNSAFE.putInt(null, struct + XrSessionActionSetsAttachInfo.COUNTACTIONSETS, value); } - /** Unsafe version of {@link #actionSets(PointerBuffer) actionSets}. */ - public static void nactionSets(long struct, PointerBuffer value) { memPutAddress(struct + XrSessionActionSetsAttachInfo.ACTIONSETS, memAddress(value)); ncountActionSets(struct, value.remaining()); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XrSessionActionSetsAttachInfo.ACTIONSETS)); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrSessionActionSetsAttachInfo} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSessionActionSetsAttachInfo ELEMENT_FACTORY = XrSessionActionSetsAttachInfo.create(-1L); - - /** - * Creates a new {@code XrSessionActionSetsAttachInfo.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSessionActionSetsAttachInfo#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSessionActionSetsAttachInfo getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSessionActionSetsAttachInfo.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrSessionActionSetsAttachInfo.nnext(address()); } - /** @return the value of the {@code countActionSets} field. */ - @NativeType("uint32_t") - public int countActionSets() { return XrSessionActionSetsAttachInfo.ncountActionSets(address()); } - /** @return a {@link PointerBuffer} view of the data pointed to by the {@code actionSets} field. */ - @NativeType("XrActionSet const *") - public PointerBuffer actionSets() { return XrSessionActionSetsAttachInfo.nactionSets(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSessionActionSetsAttachInfo.ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_SESSION_ACTION_SETS_ATTACH_INFO TYPE_SESSION_ACTION_SETS_ATTACH_INFO} value to the {@code type} field. */ - public Buffer type$Default() { return type(XR10.XR_TYPE_SESSION_ACTION_SETS_ATTACH_INFO); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrSessionActionSetsAttachInfo.nnext(address(), value); return this; } - /** Sets the address of the specified {@link PointerBuffer} to the {@code actionSets} field. */ - public Buffer actionSets(@NativeType("XrActionSet const *") PointerBuffer value) { XrSessionActionSetsAttachInfo.nactionSets(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSessionBeginInfo.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSessionBeginInfo.java deleted file mode 100644 index 48f7533a..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSessionBeginInfo.java +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSessionBeginInfo {
- *     XrStructureType type;
- *     void const * next;
- *     XrViewConfigurationType primaryViewConfigurationType;
- * }
- */ -public class XrSessionBeginInfo extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - PRIMARYVIEWCONFIGURATIONTYPE; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - PRIMARYVIEWCONFIGURATIONTYPE = layout.offsetof(2); - } - - /** - * Creates a {@code XrSessionBeginInfo} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSessionBeginInfo(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code primaryViewConfigurationType} field. */ - @NativeType("XrViewConfigurationType") - public int primaryViewConfigurationType() { return nprimaryViewConfigurationType(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrSessionBeginInfo type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_SESSION_BEGIN_INFO TYPE_SESSION_BEGIN_INFO} value to the {@code type} field. */ - public XrSessionBeginInfo type$Default() { return type(XR10.XR_TYPE_SESSION_BEGIN_INFO); } - /** Sets the specified value to the {@code next} field. */ - public XrSessionBeginInfo next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code primaryViewConfigurationType} field. */ - public XrSessionBeginInfo primaryViewConfigurationType(@NativeType("XrViewConfigurationType") int value) { nprimaryViewConfigurationType(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrSessionBeginInfo set( - int type, - long next, - int primaryViewConfigurationType - ) { - type(type); - next(next); - primaryViewConfigurationType(primaryViewConfigurationType); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSessionBeginInfo set(XrSessionBeginInfo src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSessionBeginInfo} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSessionBeginInfo malloc() { - return wrap(XrSessionBeginInfo.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSessionBeginInfo} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSessionBeginInfo calloc() { - return wrap(XrSessionBeginInfo.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSessionBeginInfo} instance allocated with {@link BufferUtils}. */ - public static XrSessionBeginInfo create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSessionBeginInfo.class, memAddress(container), container); - } - - /** Returns a new {@code XrSessionBeginInfo} instance for the specified memory address. */ - public static XrSessionBeginInfo create(long address) { - return wrap(XrSessionBeginInfo.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSessionBeginInfo createSafe(long address) { - return address == NULL ? null : wrap(XrSessionBeginInfo.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSessionBeginInfo.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSessionBeginInfo} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSessionBeginInfo malloc(MemoryStack stack) { - return wrap(XrSessionBeginInfo.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSessionBeginInfo} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSessionBeginInfo calloc(MemoryStack stack) { - return wrap(XrSessionBeginInfo.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSessionBeginInfo.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSessionBeginInfo.NEXT); } - /** Unsafe version of {@link #primaryViewConfigurationType}. */ - public static int nprimaryViewConfigurationType(long struct) { return UNSAFE.getInt(null, struct + XrSessionBeginInfo.PRIMARYVIEWCONFIGURATIONTYPE); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSessionBeginInfo.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSessionBeginInfo.NEXT, value); } - /** Unsafe version of {@link #primaryViewConfigurationType(int) primaryViewConfigurationType}. */ - public static void nprimaryViewConfigurationType(long struct, int value) { UNSAFE.putInt(null, struct + XrSessionBeginInfo.PRIMARYVIEWCONFIGURATIONTYPE, value); } - - // ----------------------------------- - - /** An array of {@link XrSessionBeginInfo} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSessionBeginInfo ELEMENT_FACTORY = XrSessionBeginInfo.create(-1L); - - /** - * Creates a new {@code XrSessionBeginInfo.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSessionBeginInfo#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSessionBeginInfo getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSessionBeginInfo.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrSessionBeginInfo.nnext(address()); } - /** @return the value of the {@code primaryViewConfigurationType} field. */ - @NativeType("XrViewConfigurationType") - public int primaryViewConfigurationType() { return XrSessionBeginInfo.nprimaryViewConfigurationType(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSessionBeginInfo.ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_SESSION_BEGIN_INFO TYPE_SESSION_BEGIN_INFO} value to the {@code type} field. */ - public Buffer type$Default() { return type(XR10.XR_TYPE_SESSION_BEGIN_INFO); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrSessionBeginInfo.nnext(address(), value); return this; } - /** Sets the specified value to the {@code primaryViewConfigurationType} field. */ - public Buffer primaryViewConfigurationType(@NativeType("XrViewConfigurationType") int value) { XrSessionBeginInfo.nprimaryViewConfigurationType(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSessionCreateInfo.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSessionCreateInfo.java deleted file mode 100644 index cd38995a..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSessionCreateInfo.java +++ /dev/null @@ -1,319 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSessionCreateInfo {
- *     XrStructureType type;
- *     void const * next;
- *     XrSessionCreateFlags createFlags;
- *     XrSystemId systemId;
- * }
- */ -public class XrSessionCreateInfo extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - CREATEFLAGS, - SYSTEMID; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(8), - __member(8) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - CREATEFLAGS = layout.offsetof(2); - SYSTEMID = layout.offsetof(3); - } - - /** - * Creates a {@code XrSessionCreateInfo} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSessionCreateInfo(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code createFlags} field. */ - @NativeType("XrSessionCreateFlags") - public long createFlags() { return ncreateFlags(address()); } - /** @return the value of the {@code systemId} field. */ - @NativeType("XrSystemId") - public long systemId() { return nsystemId(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrSessionCreateInfo type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_SESSION_CREATE_INFO TYPE_SESSION_CREATE_INFO} value to the {@code type} field. */ - public XrSessionCreateInfo type$Default() { return type(XR10.XR_TYPE_SESSION_CREATE_INFO); } - /** Sets the specified value to the {@code next} field. */ - public XrSessionCreateInfo next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code createFlags} field. */ - public XrSessionCreateInfo createFlags(@NativeType("XrSessionCreateFlags") long value) { ncreateFlags(address(), value); return this; } - /** Sets the specified value to the {@code systemId} field. */ - public XrSessionCreateInfo systemId(@NativeType("XrSystemId") long value) { nsystemId(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrSessionCreateInfo set( - int type, - long next, - long createFlags, - long systemId - ) { - type(type); - next(next); - createFlags(createFlags); - systemId(systemId); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSessionCreateInfo set(XrSessionCreateInfo src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSessionCreateInfo} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSessionCreateInfo malloc() { - return wrap(XrSessionCreateInfo.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSessionCreateInfo} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSessionCreateInfo calloc() { - return wrap(XrSessionCreateInfo.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSessionCreateInfo} instance allocated with {@link BufferUtils}. */ - public static XrSessionCreateInfo create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSessionCreateInfo.class, memAddress(container), container); - } - - /** Returns a new {@code XrSessionCreateInfo} instance for the specified memory address. */ - public static XrSessionCreateInfo create(long address) { - return wrap(XrSessionCreateInfo.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSessionCreateInfo createSafe(long address) { - return address == NULL ? null : wrap(XrSessionCreateInfo.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSessionCreateInfo.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSessionCreateInfo} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSessionCreateInfo malloc(MemoryStack stack) { - return wrap(XrSessionCreateInfo.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSessionCreateInfo} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSessionCreateInfo calloc(MemoryStack stack) { - return wrap(XrSessionCreateInfo.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSessionCreateInfo.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSessionCreateInfo.NEXT); } - /** Unsafe version of {@link #createFlags}. */ - public static long ncreateFlags(long struct) { return UNSAFE.getLong(null, struct + XrSessionCreateInfo.CREATEFLAGS); } - /** Unsafe version of {@link #systemId}. */ - public static long nsystemId(long struct) { return UNSAFE.getLong(null, struct + XrSessionCreateInfo.SYSTEMID); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSessionCreateInfo.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSessionCreateInfo.NEXT, value); } - /** Unsafe version of {@link #createFlags(long) createFlags}. */ - public static void ncreateFlags(long struct, long value) { UNSAFE.putLong(null, struct + XrSessionCreateInfo.CREATEFLAGS, value); } - /** Unsafe version of {@link #systemId(long) systemId}. */ - public static void nsystemId(long struct, long value) { UNSAFE.putLong(null, struct + XrSessionCreateInfo.SYSTEMID, value); } - - // ----------------------------------- - - /** An array of {@link XrSessionCreateInfo} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSessionCreateInfo ELEMENT_FACTORY = XrSessionCreateInfo.create(-1L); - - /** - * Creates a new {@code XrSessionCreateInfo.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSessionCreateInfo#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSessionCreateInfo getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSessionCreateInfo.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrSessionCreateInfo.nnext(address()); } - /** @return the value of the {@code createFlags} field. */ - @NativeType("XrSessionCreateFlags") - public long createFlags() { return XrSessionCreateInfo.ncreateFlags(address()); } - /** @return the value of the {@code systemId} field. */ - @NativeType("XrSystemId") - public long systemId() { return XrSessionCreateInfo.nsystemId(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSessionCreateInfo.ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_SESSION_CREATE_INFO TYPE_SESSION_CREATE_INFO} value to the {@code type} field. */ - public Buffer type$Default() { return type(XR10.XR_TYPE_SESSION_CREATE_INFO); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrSessionCreateInfo.nnext(address(), value); return this; } - /** Sets the specified value to the {@code createFlags} field. */ - public Buffer createFlags(@NativeType("XrSessionCreateFlags") long value) { XrSessionCreateInfo.ncreateFlags(address(), value); return this; } - /** Sets the specified value to the {@code systemId} field. */ - public Buffer systemId(@NativeType("XrSystemId") long value) { XrSessionCreateInfo.nsystemId(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSessionCreateInfoOverlayEXTX.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSessionCreateInfoOverlayEXTX.java deleted file mode 100644 index 8334f02c..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSessionCreateInfoOverlayEXTX.java +++ /dev/null @@ -1,319 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSessionCreateInfoOverlayEXTX {
- *     XrStructureType type;
- *     void const * next;
- *     XrOverlaySessionCreateFlagsEXTX createFlags;
- *     uint32_t sessionLayersPlacement;
- * }
- */ -public class XrSessionCreateInfoOverlayEXTX extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - CREATEFLAGS, - SESSIONLAYERSPLACEMENT; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(8), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - CREATEFLAGS = layout.offsetof(2); - SESSIONLAYERSPLACEMENT = layout.offsetof(3); - } - - /** - * Creates a {@code XrSessionCreateInfoOverlayEXTX} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSessionCreateInfoOverlayEXTX(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code createFlags} field. */ - @NativeType("XrOverlaySessionCreateFlagsEXTX") - public long createFlags() { return ncreateFlags(address()); } - /** @return the value of the {@code sessionLayersPlacement} field. */ - @NativeType("uint32_t") - public int sessionLayersPlacement() { return nsessionLayersPlacement(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrSessionCreateInfoOverlayEXTX type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link EXTXOverlay#XR_TYPE_SESSION_CREATE_INFO_OVERLAY_EXTX TYPE_SESSION_CREATE_INFO_OVERLAY_EXTX} value to the {@code type} field. */ - public XrSessionCreateInfoOverlayEXTX type$Default() { return type(EXTXOverlay.XR_TYPE_SESSION_CREATE_INFO_OVERLAY_EXTX); } - /** Sets the specified value to the {@code next} field. */ - public XrSessionCreateInfoOverlayEXTX next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code createFlags} field. */ - public XrSessionCreateInfoOverlayEXTX createFlags(@NativeType("XrOverlaySessionCreateFlagsEXTX") long value) { ncreateFlags(address(), value); return this; } - /** Sets the specified value to the {@code sessionLayersPlacement} field. */ - public XrSessionCreateInfoOverlayEXTX sessionLayersPlacement(@NativeType("uint32_t") int value) { nsessionLayersPlacement(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrSessionCreateInfoOverlayEXTX set( - int type, - long next, - long createFlags, - int sessionLayersPlacement - ) { - type(type); - next(next); - createFlags(createFlags); - sessionLayersPlacement(sessionLayersPlacement); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSessionCreateInfoOverlayEXTX set(XrSessionCreateInfoOverlayEXTX src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSessionCreateInfoOverlayEXTX} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSessionCreateInfoOverlayEXTX malloc() { - return wrap(XrSessionCreateInfoOverlayEXTX.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSessionCreateInfoOverlayEXTX} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSessionCreateInfoOverlayEXTX calloc() { - return wrap(XrSessionCreateInfoOverlayEXTX.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSessionCreateInfoOverlayEXTX} instance allocated with {@link BufferUtils}. */ - public static XrSessionCreateInfoOverlayEXTX create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSessionCreateInfoOverlayEXTX.class, memAddress(container), container); - } - - /** Returns a new {@code XrSessionCreateInfoOverlayEXTX} instance for the specified memory address. */ - public static XrSessionCreateInfoOverlayEXTX create(long address) { - return wrap(XrSessionCreateInfoOverlayEXTX.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSessionCreateInfoOverlayEXTX createSafe(long address) { - return address == NULL ? null : wrap(XrSessionCreateInfoOverlayEXTX.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSessionCreateInfoOverlayEXTX.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSessionCreateInfoOverlayEXTX} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSessionCreateInfoOverlayEXTX malloc(MemoryStack stack) { - return wrap(XrSessionCreateInfoOverlayEXTX.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSessionCreateInfoOverlayEXTX} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSessionCreateInfoOverlayEXTX calloc(MemoryStack stack) { - return wrap(XrSessionCreateInfoOverlayEXTX.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSessionCreateInfoOverlayEXTX.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSessionCreateInfoOverlayEXTX.NEXT); } - /** Unsafe version of {@link #createFlags}. */ - public static long ncreateFlags(long struct) { return UNSAFE.getLong(null, struct + XrSessionCreateInfoOverlayEXTX.CREATEFLAGS); } - /** Unsafe version of {@link #sessionLayersPlacement}. */ - public static int nsessionLayersPlacement(long struct) { return UNSAFE.getInt(null, struct + XrSessionCreateInfoOverlayEXTX.SESSIONLAYERSPLACEMENT); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSessionCreateInfoOverlayEXTX.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSessionCreateInfoOverlayEXTX.NEXT, value); } - /** Unsafe version of {@link #createFlags(long) createFlags}. */ - public static void ncreateFlags(long struct, long value) { UNSAFE.putLong(null, struct + XrSessionCreateInfoOverlayEXTX.CREATEFLAGS, value); } - /** Unsafe version of {@link #sessionLayersPlacement(int) sessionLayersPlacement}. */ - public static void nsessionLayersPlacement(long struct, int value) { UNSAFE.putInt(null, struct + XrSessionCreateInfoOverlayEXTX.SESSIONLAYERSPLACEMENT, value); } - - // ----------------------------------- - - /** An array of {@link XrSessionCreateInfoOverlayEXTX} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSessionCreateInfoOverlayEXTX ELEMENT_FACTORY = XrSessionCreateInfoOverlayEXTX.create(-1L); - - /** - * Creates a new {@code XrSessionCreateInfoOverlayEXTX.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSessionCreateInfoOverlayEXTX#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSessionCreateInfoOverlayEXTX getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSessionCreateInfoOverlayEXTX.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrSessionCreateInfoOverlayEXTX.nnext(address()); } - /** @return the value of the {@code createFlags} field. */ - @NativeType("XrOverlaySessionCreateFlagsEXTX") - public long createFlags() { return XrSessionCreateInfoOverlayEXTX.ncreateFlags(address()); } - /** @return the value of the {@code sessionLayersPlacement} field. */ - @NativeType("uint32_t") - public int sessionLayersPlacement() { return XrSessionCreateInfoOverlayEXTX.nsessionLayersPlacement(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSessionCreateInfoOverlayEXTX.ntype(address(), value); return this; } - /** Sets the {@link EXTXOverlay#XR_TYPE_SESSION_CREATE_INFO_OVERLAY_EXTX TYPE_SESSION_CREATE_INFO_OVERLAY_EXTX} value to the {@code type} field. */ - public Buffer type$Default() { return type(EXTXOverlay.XR_TYPE_SESSION_CREATE_INFO_OVERLAY_EXTX); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrSessionCreateInfoOverlayEXTX.nnext(address(), value); return this; } - /** Sets the specified value to the {@code createFlags} field. */ - public Buffer createFlags(@NativeType("XrOverlaySessionCreateFlagsEXTX") long value) { XrSessionCreateInfoOverlayEXTX.ncreateFlags(address(), value); return this; } - /** Sets the specified value to the {@code sessionLayersPlacement} field. */ - public Buffer sessionLayersPlacement(@NativeType("uint32_t") int value) { XrSessionCreateInfoOverlayEXTX.nsessionLayersPlacement(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSpace.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSpace.java deleted file mode 100644 index 12f38b1f..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSpace.java +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.openxr; - -public class XrSpace extends DispatchableHandle { - public XrSpace(long handle, DispatchableHandle session) { - super(handle, session.getCapabilities()); - } - - public XrSpace(long handle, XRCapabilities capabilities) { - super(handle, capabilities); - } -} diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSpaceLocation.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSpaceLocation.java deleted file mode 100644 index 103780f5..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSpaceLocation.java +++ /dev/null @@ -1,321 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSpaceLocation {
- *     XrStructureType type;
- *     void * next;
- *     XrSpaceLocationFlags locationFlags;
- *     {@link XrPosef XrPosef} pose;
- * }
- */ -public class XrSpaceLocation extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - LOCATIONFLAGS, - POSE; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(8), - __member(XrPosef.SIZEOF, XrPosef.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - LOCATIONFLAGS = layout.offsetof(2); - POSE = layout.offsetof(3); - } - - /** - * Creates a {@code XrSpaceLocation} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSpaceLocation(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return the value of the {@code locationFlags} field. */ - @NativeType("XrSpaceLocationFlags") - public long locationFlags() { return nlocationFlags(address()); } - /** @return a {@link XrPosef} view of the {@code pose} field. */ - public XrPosef pose() { return npose(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrSpaceLocation type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_SPACE_LOCATION TYPE_SPACE_LOCATION} value to the {@code type} field. */ - public XrSpaceLocation type$Default() { return type(XR10.XR_TYPE_SPACE_LOCATION); } - /** Sets the specified value to the {@code next} field. */ - public XrSpaceLocation next(@NativeType("void *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code locationFlags} field. */ - public XrSpaceLocation locationFlags(@NativeType("XrSpaceLocationFlags") long value) { nlocationFlags(address(), value); return this; } - /** Copies the specified {@link XrPosef} to the {@code pose} field. */ - public XrSpaceLocation pose(XrPosef value) { npose(address(), value); return this; } - /** Passes the {@code pose} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrSpaceLocation pose(java.util.function.Consumer consumer) { consumer.accept(pose()); return this; } - - /** Initializes this struct with the specified values. */ - public XrSpaceLocation set( - int type, - long next, - long locationFlags, - XrPosef pose - ) { - type(type); - next(next); - locationFlags(locationFlags); - pose(pose); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSpaceLocation set(XrSpaceLocation src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSpaceLocation} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSpaceLocation malloc() { - return wrap(XrSpaceLocation.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSpaceLocation} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSpaceLocation calloc() { - return wrap(XrSpaceLocation.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSpaceLocation} instance allocated with {@link BufferUtils}. */ - public static XrSpaceLocation create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSpaceLocation.class, memAddress(container), container); - } - - /** Returns a new {@code XrSpaceLocation} instance for the specified memory address. */ - public static XrSpaceLocation create(long address) { - return wrap(XrSpaceLocation.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSpaceLocation createSafe(long address) { - return address == NULL ? null : wrap(XrSpaceLocation.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSpaceLocation.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSpaceLocation} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSpaceLocation malloc(MemoryStack stack) { - return wrap(XrSpaceLocation.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSpaceLocation} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSpaceLocation calloc(MemoryStack stack) { - return wrap(XrSpaceLocation.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSpaceLocation.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSpaceLocation.NEXT); } - /** Unsafe version of {@link #locationFlags}. */ - public static long nlocationFlags(long struct) { return UNSAFE.getLong(null, struct + XrSpaceLocation.LOCATIONFLAGS); } - /** Unsafe version of {@link #pose}. */ - public static XrPosef npose(long struct) { return XrPosef.create(struct + XrSpaceLocation.POSE); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSpaceLocation.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSpaceLocation.NEXT, value); } - /** Unsafe version of {@link #locationFlags(long) locationFlags}. */ - public static void nlocationFlags(long struct, long value) { UNSAFE.putLong(null, struct + XrSpaceLocation.LOCATIONFLAGS, value); } - /** Unsafe version of {@link #pose(XrPosef) pose}. */ - public static void npose(long struct, XrPosef value) { memCopy(value.address(), struct + XrSpaceLocation.POSE, XrPosef.SIZEOF); } - - // ----------------------------------- - - /** An array of {@link XrSpaceLocation} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSpaceLocation ELEMENT_FACTORY = XrSpaceLocation.create(-1L); - - /** - * Creates a new {@code XrSpaceLocation.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSpaceLocation#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSpaceLocation getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSpaceLocation.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrSpaceLocation.nnext(address()); } - /** @return the value of the {@code locationFlags} field. */ - @NativeType("XrSpaceLocationFlags") - public long locationFlags() { return XrSpaceLocation.nlocationFlags(address()); } - /** @return a {@link XrPosef} view of the {@code pose} field. */ - public XrPosef pose() { return XrSpaceLocation.npose(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSpaceLocation.ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_SPACE_LOCATION TYPE_SPACE_LOCATION} value to the {@code type} field. */ - public Buffer type$Default() { return type(XR10.XR_TYPE_SPACE_LOCATION); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrSpaceLocation.nnext(address(), value); return this; } - /** Sets the specified value to the {@code locationFlags} field. */ - public Buffer locationFlags(@NativeType("XrSpaceLocationFlags") long value) { XrSpaceLocation.nlocationFlags(address(), value); return this; } - /** Copies the specified {@link XrPosef} to the {@code pose} field. */ - public Buffer pose(XrPosef value) { XrSpaceLocation.npose(address(), value); return this; } - /** Passes the {@code pose} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer pose(java.util.function.Consumer consumer) { consumer.accept(pose()); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSpaceVelocity.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSpaceVelocity.java deleted file mode 100644 index 2c827957..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSpaceVelocity.java +++ /dev/null @@ -1,343 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSpaceVelocity {
- *     XrStructureType type;
- *     void * next;
- *     XrSpaceVelocityFlags velocityFlags;
- *     {@link XrVector3f XrVector3f} linearVelocity;
- *     {@link XrVector3f XrVector3f} angularVelocity;
- * }
- */ -public class XrSpaceVelocity extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - VELOCITYFLAGS, - LINEARVELOCITY, - ANGULARVELOCITY; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(8), - __member(XrVector3f.SIZEOF, XrVector3f.ALIGNOF), - __member(XrVector3f.SIZEOF, XrVector3f.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - VELOCITYFLAGS = layout.offsetof(2); - LINEARVELOCITY = layout.offsetof(3); - ANGULARVELOCITY = layout.offsetof(4); - } - - /** - * Creates a {@code XrSpaceVelocity} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSpaceVelocity(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return the value of the {@code velocityFlags} field. */ - @NativeType("XrSpaceVelocityFlags") - public long velocityFlags() { return nvelocityFlags(address()); } - /** @return a {@link XrVector3f} view of the {@code linearVelocity} field. */ - public XrVector3f linearVelocity() { return nlinearVelocity(address()); } - /** @return a {@link XrVector3f} view of the {@code angularVelocity} field. */ - public XrVector3f angularVelocity() { return nangularVelocity(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrSpaceVelocity type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_SPACE_VELOCITY TYPE_SPACE_VELOCITY} value to the {@code type} field. */ - public XrSpaceVelocity type$Default() { return type(XR10.XR_TYPE_SPACE_VELOCITY); } - /** Sets the specified value to the {@code next} field. */ - public XrSpaceVelocity next(@NativeType("void *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code velocityFlags} field. */ - public XrSpaceVelocity velocityFlags(@NativeType("XrSpaceVelocityFlags") long value) { nvelocityFlags(address(), value); return this; } - /** Copies the specified {@link XrVector3f} to the {@code linearVelocity} field. */ - public XrSpaceVelocity linearVelocity(XrVector3f value) { nlinearVelocity(address(), value); return this; } - /** Passes the {@code linearVelocity} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrSpaceVelocity linearVelocity(java.util.function.Consumer consumer) { consumer.accept(linearVelocity()); return this; } - /** Copies the specified {@link XrVector3f} to the {@code angularVelocity} field. */ - public XrSpaceVelocity angularVelocity(XrVector3f value) { nangularVelocity(address(), value); return this; } - /** Passes the {@code angularVelocity} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrSpaceVelocity angularVelocity(java.util.function.Consumer consumer) { consumer.accept(angularVelocity()); return this; } - - /** Initializes this struct with the specified values. */ - public XrSpaceVelocity set( - int type, - long next, - long velocityFlags, - XrVector3f linearVelocity, - XrVector3f angularVelocity - ) { - type(type); - next(next); - velocityFlags(velocityFlags); - linearVelocity(linearVelocity); - angularVelocity(angularVelocity); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSpaceVelocity set(XrSpaceVelocity src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSpaceVelocity} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSpaceVelocity malloc() { - return wrap(XrSpaceVelocity.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSpaceVelocity} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSpaceVelocity calloc() { - return wrap(XrSpaceVelocity.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSpaceVelocity} instance allocated with {@link BufferUtils}. */ - public static XrSpaceVelocity create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSpaceVelocity.class, memAddress(container), container); - } - - /** Returns a new {@code XrSpaceVelocity} instance for the specified memory address. */ - public static XrSpaceVelocity create(long address) { - return wrap(XrSpaceVelocity.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSpaceVelocity createSafe(long address) { - return address == NULL ? null : wrap(XrSpaceVelocity.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSpaceVelocity.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSpaceVelocity} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSpaceVelocity malloc(MemoryStack stack) { - return wrap(XrSpaceVelocity.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSpaceVelocity} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSpaceVelocity calloc(MemoryStack stack) { - return wrap(XrSpaceVelocity.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSpaceVelocity.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSpaceVelocity.NEXT); } - /** Unsafe version of {@link #velocityFlags}. */ - public static long nvelocityFlags(long struct) { return UNSAFE.getLong(null, struct + XrSpaceVelocity.VELOCITYFLAGS); } - /** Unsafe version of {@link #linearVelocity}. */ - public static XrVector3f nlinearVelocity(long struct) { return XrVector3f.create(struct + XrSpaceVelocity.LINEARVELOCITY); } - /** Unsafe version of {@link #angularVelocity}. */ - public static XrVector3f nangularVelocity(long struct) { return XrVector3f.create(struct + XrSpaceVelocity.ANGULARVELOCITY); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSpaceVelocity.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSpaceVelocity.NEXT, value); } - /** Unsafe version of {@link #velocityFlags(long) velocityFlags}. */ - public static void nvelocityFlags(long struct, long value) { UNSAFE.putLong(null, struct + XrSpaceVelocity.VELOCITYFLAGS, value); } - /** Unsafe version of {@link #linearVelocity(XrVector3f) linearVelocity}. */ - public static void nlinearVelocity(long struct, XrVector3f value) { memCopy(value.address(), struct + XrSpaceVelocity.LINEARVELOCITY, XrVector3f.SIZEOF); } - /** Unsafe version of {@link #angularVelocity(XrVector3f) angularVelocity}. */ - public static void nangularVelocity(long struct, XrVector3f value) { memCopy(value.address(), struct + XrSpaceVelocity.ANGULARVELOCITY, XrVector3f.SIZEOF); } - - // ----------------------------------- - - /** An array of {@link XrSpaceVelocity} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSpaceVelocity ELEMENT_FACTORY = XrSpaceVelocity.create(-1L); - - /** - * Creates a new {@code XrSpaceVelocity.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSpaceVelocity#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSpaceVelocity getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSpaceVelocity.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrSpaceVelocity.nnext(address()); } - /** @return the value of the {@code velocityFlags} field. */ - @NativeType("XrSpaceVelocityFlags") - public long velocityFlags() { return XrSpaceVelocity.nvelocityFlags(address()); } - /** @return a {@link XrVector3f} view of the {@code linearVelocity} field. */ - public XrVector3f linearVelocity() { return XrSpaceVelocity.nlinearVelocity(address()); } - /** @return a {@link XrVector3f} view of the {@code angularVelocity} field. */ - public XrVector3f angularVelocity() { return XrSpaceVelocity.nangularVelocity(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSpaceVelocity.ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_SPACE_VELOCITY TYPE_SPACE_VELOCITY} value to the {@code type} field. */ - public Buffer type$Default() { return type(XR10.XR_TYPE_SPACE_VELOCITY); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrSpaceVelocity.nnext(address(), value); return this; } - /** Sets the specified value to the {@code velocityFlags} field. */ - public Buffer velocityFlags(@NativeType("XrSpaceVelocityFlags") long value) { XrSpaceVelocity.nvelocityFlags(address(), value); return this; } - /** Copies the specified {@link XrVector3f} to the {@code linearVelocity} field. */ - public Buffer linearVelocity(XrVector3f value) { XrSpaceVelocity.nlinearVelocity(address(), value); return this; } - /** Passes the {@code linearVelocity} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer linearVelocity(java.util.function.Consumer consumer) { consumer.accept(linearVelocity()); return this; } - /** Copies the specified {@link XrVector3f} to the {@code angularVelocity} field. */ - public Buffer angularVelocity(XrVector3f value) { XrSpaceVelocity.nangularVelocity(address(), value); return this; } - /** Passes the {@code angularVelocity} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer angularVelocity(java.util.function.Consumer consumer) { consumer.accept(angularVelocity()); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSpatialAnchorCreateInfoMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSpatialAnchorCreateInfoMSFT.java deleted file mode 100644 index c883299e..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSpatialAnchorCreateInfoMSFT.java +++ /dev/null @@ -1,363 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSpatialAnchorCreateInfoMSFT {
- *     XrStructureType type;
- *     void const * next;
- *     XrSpace space;
- *     {@link XrPosef XrPosef} pose;
- *     XrTime time;
- * }
- */ -public class XrSpatialAnchorCreateInfoMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - SPACE, - POSE, - TIME; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(XrPosef.SIZEOF, XrPosef.ALIGNOF), - __member(8) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - SPACE = layout.offsetof(2); - POSE = layout.offsetof(3); - TIME = layout.offsetof(4); - } - - /** - * Creates a {@code XrSpatialAnchorCreateInfoMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSpatialAnchorCreateInfoMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code space} field. */ - @NativeType("XrSpace") - public long space() { return nspace(address()); } - /** @return a {@link XrPosef} view of the {@code pose} field. */ - public XrPosef pose() { return npose(address()); } - /** @return the value of the {@code time} field. */ - @NativeType("XrTime") - public long time() { return ntime(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrSpatialAnchorCreateInfoMSFT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link MSFTSpatialAnchor#XR_TYPE_SPATIAL_ANCHOR_CREATE_INFO_MSFT TYPE_SPATIAL_ANCHOR_CREATE_INFO_MSFT} value to the {@code type} field. */ - public XrSpatialAnchorCreateInfoMSFT type$Default() { return type(MSFTSpatialAnchor.XR_TYPE_SPATIAL_ANCHOR_CREATE_INFO_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public XrSpatialAnchorCreateInfoMSFT next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code space} field. */ - public XrSpatialAnchorCreateInfoMSFT space(XrSpace value) { nspace(address(), value); return this; } - /** Copies the specified {@link XrPosef} to the {@code pose} field. */ - public XrSpatialAnchorCreateInfoMSFT pose(XrPosef value) { npose(address(), value); return this; } - /** Passes the {@code pose} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrSpatialAnchorCreateInfoMSFT pose(java.util.function.Consumer consumer) { consumer.accept(pose()); return this; } - /** Sets the specified value to the {@code time} field. */ - public XrSpatialAnchorCreateInfoMSFT time(@NativeType("XrTime") long value) { ntime(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrSpatialAnchorCreateInfoMSFT set( - int type, - long next, - XrSpace space, - XrPosef pose, - long time - ) { - type(type); - next(next); - space(space); - pose(pose); - time(time); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSpatialAnchorCreateInfoMSFT set(XrSpatialAnchorCreateInfoMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSpatialAnchorCreateInfoMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSpatialAnchorCreateInfoMSFT malloc() { - return wrap(XrSpatialAnchorCreateInfoMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSpatialAnchorCreateInfoMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSpatialAnchorCreateInfoMSFT calloc() { - return wrap(XrSpatialAnchorCreateInfoMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSpatialAnchorCreateInfoMSFT} instance allocated with {@link BufferUtils}. */ - public static XrSpatialAnchorCreateInfoMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSpatialAnchorCreateInfoMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrSpatialAnchorCreateInfoMSFT} instance for the specified memory address. */ - public static XrSpatialAnchorCreateInfoMSFT create(long address) { - return wrap(XrSpatialAnchorCreateInfoMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSpatialAnchorCreateInfoMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrSpatialAnchorCreateInfoMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSpatialAnchorCreateInfoMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSpatialAnchorCreateInfoMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSpatialAnchorCreateInfoMSFT malloc(MemoryStack stack) { - return wrap(XrSpatialAnchorCreateInfoMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSpatialAnchorCreateInfoMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSpatialAnchorCreateInfoMSFT calloc(MemoryStack stack) { - return wrap(XrSpatialAnchorCreateInfoMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSpatialAnchorCreateInfoMSFT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSpatialAnchorCreateInfoMSFT.NEXT); } - /** Unsafe version of {@link #space}. */ - public static long nspace(long struct) { return memGetAddress(struct + XrSpatialAnchorCreateInfoMSFT.SPACE); } - /** Unsafe version of {@link #pose}. */ - public static XrPosef npose(long struct) { return XrPosef.create(struct + XrSpatialAnchorCreateInfoMSFT.POSE); } - /** Unsafe version of {@link #time}. */ - public static long ntime(long struct) { return UNSAFE.getLong(null, struct + XrSpatialAnchorCreateInfoMSFT.TIME); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSpatialAnchorCreateInfoMSFT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSpatialAnchorCreateInfoMSFT.NEXT, value); } - /** Unsafe version of {@link #space(XrSpace) space}. */ - public static void nspace(long struct, XrSpace value) { memPutAddress(struct + XrSpatialAnchorCreateInfoMSFT.SPACE, value.address()); } - /** Unsafe version of {@link #pose(XrPosef) pose}. */ - public static void npose(long struct, XrPosef value) { memCopy(value.address(), struct + XrSpatialAnchorCreateInfoMSFT.POSE, XrPosef.SIZEOF); } - /** Unsafe version of {@link #time(long) time}. */ - public static void ntime(long struct, long value) { UNSAFE.putLong(null, struct + XrSpatialAnchorCreateInfoMSFT.TIME, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XrSpatialAnchorCreateInfoMSFT.SPACE)); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrSpatialAnchorCreateInfoMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSpatialAnchorCreateInfoMSFT ELEMENT_FACTORY = XrSpatialAnchorCreateInfoMSFT.create(-1L); - - /** - * Creates a new {@code XrSpatialAnchorCreateInfoMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSpatialAnchorCreateInfoMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSpatialAnchorCreateInfoMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSpatialAnchorCreateInfoMSFT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrSpatialAnchorCreateInfoMSFT.nnext(address()); } - /** @return the value of the {@code space} field. */ - @NativeType("XrSpace") - public long space() { return XrSpatialAnchorCreateInfoMSFT.nspace(address()); } - /** @return a {@link XrPosef} view of the {@code pose} field. */ - public XrPosef pose() { return XrSpatialAnchorCreateInfoMSFT.npose(address()); } - /** @return the value of the {@code time} field. */ - @NativeType("XrTime") - public long time() { return XrSpatialAnchorCreateInfoMSFT.ntime(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSpatialAnchorCreateInfoMSFT.ntype(address(), value); return this; } - /** Sets the {@link MSFTSpatialAnchor#XR_TYPE_SPATIAL_ANCHOR_CREATE_INFO_MSFT TYPE_SPATIAL_ANCHOR_CREATE_INFO_MSFT} value to the {@code type} field. */ - public Buffer type$Default() { return type(MSFTSpatialAnchor.XR_TYPE_SPATIAL_ANCHOR_CREATE_INFO_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrSpatialAnchorCreateInfoMSFT.nnext(address(), value); return this; } - /** Sets the specified value to the {@code space} field. */ - public Buffer space(XrSpace value) { XrSpatialAnchorCreateInfoMSFT.nspace(address(), value); return this; } - /** Copies the specified {@link XrPosef} to the {@code pose} field. */ - public Buffer pose(XrPosef value) { XrSpatialAnchorCreateInfoMSFT.npose(address(), value); return this; } - /** Passes the {@code pose} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer pose(java.util.function.Consumer consumer) { consumer.accept(pose()); return this; } - /** Sets the specified value to the {@code time} field. */ - public Buffer time(@NativeType("XrTime") long value) { XrSpatialAnchorCreateInfoMSFT.ntime(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT.java deleted file mode 100644 index 2441ab13..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT.java +++ /dev/null @@ -1,343 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT {
- *     XrStructureType type;
- *     void const * next;
- *     XrSpatialAnchorStoreConnectionMSFT spatialAnchorStore;
- *     {@link XrSpatialAnchorPersistenceNameMSFT XrSpatialAnchorPersistenceNameMSFT} spatialAnchorPersistenceName;
- * }
- */ -public class XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - SPATIALANCHORSTORE, - SPATIALANCHORPERSISTENCENAME; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(XrSpatialAnchorPersistenceNameMSFT.SIZEOF, XrSpatialAnchorPersistenceNameMSFT.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - SPATIALANCHORSTORE = layout.offsetof(2); - SPATIALANCHORPERSISTENCENAME = layout.offsetof(3); - } - - /** - * Creates a {@code XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code spatialAnchorStore} field. */ - @NativeType("XrSpatialAnchorStoreConnectionMSFT") - public long spatialAnchorStore() { return nspatialAnchorStore(address()); } - /** @return a {@link XrSpatialAnchorPersistenceNameMSFT} view of the {@code spatialAnchorPersistenceName} field. */ - public XrSpatialAnchorPersistenceNameMSFT spatialAnchorPersistenceName() { return nspatialAnchorPersistenceName(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link MSFTSpatialAnchorPersistence#XR_TYPE_SPATIAL_ANCHOR_FROM_PERSISTED_ANCHOR_CREATE_INFO_MSFT TYPE_SPATIAL_ANCHOR_FROM_PERSISTED_ANCHOR_CREATE_INFO_MSFT} value to the {@code type} field. */ - public XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT type$Default() { return type(MSFTSpatialAnchorPersistence.XR_TYPE_SPATIAL_ANCHOR_FROM_PERSISTED_ANCHOR_CREATE_INFO_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code spatialAnchorStore} field. */ - public XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT spatialAnchorStore(XrSpatialAnchorStoreConnectionMSFT value) { nspatialAnchorStore(address(), value); return this; } - /** Copies the specified {@link XrSpatialAnchorPersistenceNameMSFT} to the {@code spatialAnchorPersistenceName} field. */ - public XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT spatialAnchorPersistenceName(XrSpatialAnchorPersistenceNameMSFT value) { nspatialAnchorPersistenceName(address(), value); return this; } - /** Passes the {@code spatialAnchorPersistenceName} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT spatialAnchorPersistenceName(java.util.function.Consumer consumer) { consumer.accept(spatialAnchorPersistenceName()); return this; } - - /** Initializes this struct with the specified values. */ - public XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT set( - int type, - long next, - XrSpatialAnchorStoreConnectionMSFT spatialAnchorStore, - XrSpatialAnchorPersistenceNameMSFT spatialAnchorPersistenceName - ) { - type(type); - next(next); - spatialAnchorStore(spatialAnchorStore); - spatialAnchorPersistenceName(spatialAnchorPersistenceName); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT set(XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT malloc() { - return wrap(XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT calloc() { - return wrap(XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT} instance allocated with {@link BufferUtils}. */ - public static XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT} instance for the specified memory address. */ - public static XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT create(long address) { - return wrap(XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT malloc(MemoryStack stack) { - return wrap(XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT calloc(MemoryStack stack) { - return wrap(XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT.NEXT); } - /** Unsafe version of {@link #spatialAnchorStore}. */ - public static long nspatialAnchorStore(long struct) { return memGetAddress(struct + XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT.SPATIALANCHORSTORE); } - /** Unsafe version of {@link #spatialAnchorPersistenceName}. */ - public static XrSpatialAnchorPersistenceNameMSFT nspatialAnchorPersistenceName(long struct) { return XrSpatialAnchorPersistenceNameMSFT.create(struct + XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT.SPATIALANCHORPERSISTENCENAME); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT.NEXT, value); } - /** Unsafe version of {@link #spatialAnchorStore(XrSpatialAnchorStoreConnectionMSFT) spatialAnchorStore}. */ - public static void nspatialAnchorStore(long struct, XrSpatialAnchorStoreConnectionMSFT value) { memPutAddress(struct + XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT.SPATIALANCHORSTORE, value.address()); } - /** Unsafe version of {@link #spatialAnchorPersistenceName(XrSpatialAnchorPersistenceNameMSFT) spatialAnchorPersistenceName}. */ - public static void nspatialAnchorPersistenceName(long struct, XrSpatialAnchorPersistenceNameMSFT value) { memCopy(value.address(), struct + XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT.SPATIALANCHORPERSISTENCENAME, XrSpatialAnchorPersistenceNameMSFT.SIZEOF); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT.SPATIALANCHORSTORE)); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT ELEMENT_FACTORY = XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT.create(-1L); - - /** - * Creates a new {@code XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT.nnext(address()); } - /** @return the value of the {@code spatialAnchorStore} field. */ - @NativeType("XrSpatialAnchorStoreConnectionMSFT") - public long spatialAnchorStore() { return XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT.nspatialAnchorStore(address()); } - /** @return a {@link XrSpatialAnchorPersistenceNameMSFT} view of the {@code spatialAnchorPersistenceName} field. */ - public XrSpatialAnchorPersistenceNameMSFT spatialAnchorPersistenceName() { return XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT.nspatialAnchorPersistenceName(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT.ntype(address(), value); return this; } - /** Sets the {@link MSFTSpatialAnchorPersistence#XR_TYPE_SPATIAL_ANCHOR_FROM_PERSISTED_ANCHOR_CREATE_INFO_MSFT TYPE_SPATIAL_ANCHOR_FROM_PERSISTED_ANCHOR_CREATE_INFO_MSFT} value to the {@code type} field. */ - public Buffer type$Default() { return type(MSFTSpatialAnchorPersistence.XR_TYPE_SPATIAL_ANCHOR_FROM_PERSISTED_ANCHOR_CREATE_INFO_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT.nnext(address(), value); return this; } - /** Sets the specified value to the {@code spatialAnchorStore} field. */ - public Buffer spatialAnchorStore(XrSpatialAnchorStoreConnectionMSFT value) { XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT.nspatialAnchorStore(address(), value); return this; } - /** Copies the specified {@link XrSpatialAnchorPersistenceNameMSFT} to the {@code spatialAnchorPersistenceName} field. */ - public Buffer spatialAnchorPersistenceName(XrSpatialAnchorPersistenceNameMSFT value) { XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT.nspatialAnchorPersistenceName(address(), value); return this; } - /** Passes the {@code spatialAnchorPersistenceName} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer spatialAnchorPersistenceName(java.util.function.Consumer consumer) { consumer.accept(spatialAnchorPersistenceName()); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSpatialAnchorMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSpatialAnchorMSFT.java deleted file mode 100644 index 48bbda67..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSpatialAnchorMSFT.java +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.openxr; - -public class XrSpatialAnchorMSFT extends DispatchableHandle { - public XrSpatialAnchorMSFT(long handle, DispatchableHandle session) { - super(handle, session.getCapabilities()); - } - - public XrSpatialAnchorMSFT(long handle, XRCapabilities capabilities) { - super(handle, capabilities); - } -} diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSpatialAnchorPersistenceInfoMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSpatialAnchorPersistenceInfoMSFT.java deleted file mode 100644 index f9bac112..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSpatialAnchorPersistenceInfoMSFT.java +++ /dev/null @@ -1,343 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSpatialAnchorPersistenceInfoMSFT {
- *     XrStructureType type;
- *     void const * next;
- *     {@link XrSpatialAnchorPersistenceNameMSFT XrSpatialAnchorPersistenceNameMSFT} spatialAnchorPersistenceName;
- *     XrSpatialAnchorMSFT spatialAnchor;
- * }
- */ -public class XrSpatialAnchorPersistenceInfoMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - SPATIALANCHORPERSISTENCENAME, - SPATIALANCHOR; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(XrSpatialAnchorPersistenceNameMSFT.SIZEOF, XrSpatialAnchorPersistenceNameMSFT.ALIGNOF), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - SPATIALANCHORPERSISTENCENAME = layout.offsetof(2); - SPATIALANCHOR = layout.offsetof(3); - } - - /** - * Creates a {@code XrSpatialAnchorPersistenceInfoMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSpatialAnchorPersistenceInfoMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return a {@link XrSpatialAnchorPersistenceNameMSFT} view of the {@code spatialAnchorPersistenceName} field. */ - public XrSpatialAnchorPersistenceNameMSFT spatialAnchorPersistenceName() { return nspatialAnchorPersistenceName(address()); } - /** @return the value of the {@code spatialAnchor} field. */ - @NativeType("XrSpatialAnchorMSFT") - public long spatialAnchor() { return nspatialAnchor(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrSpatialAnchorPersistenceInfoMSFT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link MSFTSpatialAnchorPersistence#XR_TYPE_SPATIAL_ANCHOR_PERSISTENCE_INFO_MSFT TYPE_SPATIAL_ANCHOR_PERSISTENCE_INFO_MSFT} value to the {@code type} field. */ - public XrSpatialAnchorPersistenceInfoMSFT type$Default() { return type(MSFTSpatialAnchorPersistence.XR_TYPE_SPATIAL_ANCHOR_PERSISTENCE_INFO_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public XrSpatialAnchorPersistenceInfoMSFT next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Copies the specified {@link XrSpatialAnchorPersistenceNameMSFT} to the {@code spatialAnchorPersistenceName} field. */ - public XrSpatialAnchorPersistenceInfoMSFT spatialAnchorPersistenceName(XrSpatialAnchorPersistenceNameMSFT value) { nspatialAnchorPersistenceName(address(), value); return this; } - /** Passes the {@code spatialAnchorPersistenceName} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrSpatialAnchorPersistenceInfoMSFT spatialAnchorPersistenceName(java.util.function.Consumer consumer) { consumer.accept(spatialAnchorPersistenceName()); return this; } - /** Sets the specified value to the {@code spatialAnchor} field. */ - public XrSpatialAnchorPersistenceInfoMSFT spatialAnchor(XrSpatialAnchorMSFT value) { nspatialAnchor(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrSpatialAnchorPersistenceInfoMSFT set( - int type, - long next, - XrSpatialAnchorPersistenceNameMSFT spatialAnchorPersistenceName, - XrSpatialAnchorMSFT spatialAnchor - ) { - type(type); - next(next); - spatialAnchorPersistenceName(spatialAnchorPersistenceName); - spatialAnchor(spatialAnchor); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSpatialAnchorPersistenceInfoMSFT set(XrSpatialAnchorPersistenceInfoMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSpatialAnchorPersistenceInfoMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSpatialAnchorPersistenceInfoMSFT malloc() { - return wrap(XrSpatialAnchorPersistenceInfoMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSpatialAnchorPersistenceInfoMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSpatialAnchorPersistenceInfoMSFT calloc() { - return wrap(XrSpatialAnchorPersistenceInfoMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSpatialAnchorPersistenceInfoMSFT} instance allocated with {@link BufferUtils}. */ - public static XrSpatialAnchorPersistenceInfoMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSpatialAnchorPersistenceInfoMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrSpatialAnchorPersistenceInfoMSFT} instance for the specified memory address. */ - public static XrSpatialAnchorPersistenceInfoMSFT create(long address) { - return wrap(XrSpatialAnchorPersistenceInfoMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSpatialAnchorPersistenceInfoMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrSpatialAnchorPersistenceInfoMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSpatialAnchorPersistenceInfoMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSpatialAnchorPersistenceInfoMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSpatialAnchorPersistenceInfoMSFT malloc(MemoryStack stack) { - return wrap(XrSpatialAnchorPersistenceInfoMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSpatialAnchorPersistenceInfoMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSpatialAnchorPersistenceInfoMSFT calloc(MemoryStack stack) { - return wrap(XrSpatialAnchorPersistenceInfoMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSpatialAnchorPersistenceInfoMSFT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSpatialAnchorPersistenceInfoMSFT.NEXT); } - /** Unsafe version of {@link #spatialAnchorPersistenceName}. */ - public static XrSpatialAnchorPersistenceNameMSFT nspatialAnchorPersistenceName(long struct) { return XrSpatialAnchorPersistenceNameMSFT.create(struct + XrSpatialAnchorPersistenceInfoMSFT.SPATIALANCHORPERSISTENCENAME); } - /** Unsafe version of {@link #spatialAnchor}. */ - public static long nspatialAnchor(long struct) { return memGetAddress(struct + XrSpatialAnchorPersistenceInfoMSFT.SPATIALANCHOR); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSpatialAnchorPersistenceInfoMSFT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSpatialAnchorPersistenceInfoMSFT.NEXT, value); } - /** Unsafe version of {@link #spatialAnchorPersistenceName(XrSpatialAnchorPersistenceNameMSFT) spatialAnchorPersistenceName}. */ - public static void nspatialAnchorPersistenceName(long struct, XrSpatialAnchorPersistenceNameMSFT value) { memCopy(value.address(), struct + XrSpatialAnchorPersistenceInfoMSFT.SPATIALANCHORPERSISTENCENAME, XrSpatialAnchorPersistenceNameMSFT.SIZEOF); } - /** Unsafe version of {@link #spatialAnchor(XrSpatialAnchorMSFT) spatialAnchor}. */ - public static void nspatialAnchor(long struct, XrSpatialAnchorMSFT value) { memPutAddress(struct + XrSpatialAnchorPersistenceInfoMSFT.SPATIALANCHOR, value.address()); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XrSpatialAnchorPersistenceInfoMSFT.SPATIALANCHOR)); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrSpatialAnchorPersistenceInfoMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSpatialAnchorPersistenceInfoMSFT ELEMENT_FACTORY = XrSpatialAnchorPersistenceInfoMSFT.create(-1L); - - /** - * Creates a new {@code XrSpatialAnchorPersistenceInfoMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSpatialAnchorPersistenceInfoMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSpatialAnchorPersistenceInfoMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSpatialAnchorPersistenceInfoMSFT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrSpatialAnchorPersistenceInfoMSFT.nnext(address()); } - /** @return a {@link XrSpatialAnchorPersistenceNameMSFT} view of the {@code spatialAnchorPersistenceName} field. */ - public XrSpatialAnchorPersistenceNameMSFT spatialAnchorPersistenceName() { return XrSpatialAnchorPersistenceInfoMSFT.nspatialAnchorPersistenceName(address()); } - /** @return the value of the {@code spatialAnchor} field. */ - @NativeType("XrSpatialAnchorMSFT") - public long spatialAnchor() { return XrSpatialAnchorPersistenceInfoMSFT.nspatialAnchor(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSpatialAnchorPersistenceInfoMSFT.ntype(address(), value); return this; } - /** Sets the {@link MSFTSpatialAnchorPersistence#XR_TYPE_SPATIAL_ANCHOR_PERSISTENCE_INFO_MSFT TYPE_SPATIAL_ANCHOR_PERSISTENCE_INFO_MSFT} value to the {@code type} field. */ - public Buffer type$Default() { return type(MSFTSpatialAnchorPersistence.XR_TYPE_SPATIAL_ANCHOR_PERSISTENCE_INFO_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrSpatialAnchorPersistenceInfoMSFT.nnext(address(), value); return this; } - /** Copies the specified {@link XrSpatialAnchorPersistenceNameMSFT} to the {@code spatialAnchorPersistenceName} field. */ - public Buffer spatialAnchorPersistenceName(XrSpatialAnchorPersistenceNameMSFT value) { XrSpatialAnchorPersistenceInfoMSFT.nspatialAnchorPersistenceName(address(), value); return this; } - /** Passes the {@code spatialAnchorPersistenceName} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer spatialAnchorPersistenceName(java.util.function.Consumer consumer) { consumer.accept(spatialAnchorPersistenceName()); return this; } - /** Sets the specified value to the {@code spatialAnchor} field. */ - public Buffer spatialAnchor(XrSpatialAnchorMSFT value) { XrSpatialAnchorPersistenceInfoMSFT.nspatialAnchor(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSpatialAnchorPersistenceNameMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSpatialAnchorPersistenceNameMSFT.java deleted file mode 100644 index 1e65e967..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSpatialAnchorPersistenceNameMSFT.java +++ /dev/null @@ -1,262 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.openxr.MSFTSpatialAnchorPersistence.XR_MAX_SPATIAL_ANCHOR_NAME_SIZE_MSFT; -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSpatialAnchorPersistenceNameMSFT {
- *     char name[XR_MAX_SPATIAL_ANCHOR_NAME_SIZE_MSFT];
- * }
- */ -public class XrSpatialAnchorPersistenceNameMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - NAME; - - static { - Layout layout = __struct( - __array(1, XR_MAX_SPATIAL_ANCHOR_NAME_SIZE_MSFT) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - NAME = layout.offsetof(0); - } - - /** - * Creates a {@code XrSpatialAnchorPersistenceNameMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSpatialAnchorPersistenceNameMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return a {@link ByteBuffer} view of the {@code name} field. */ - @NativeType("char[XR_MAX_SPATIAL_ANCHOR_NAME_SIZE_MSFT]") - public ByteBuffer name() { return nname(address()); } - /** @return the null-terminated string stored in the {@code name} field. */ - @NativeType("char[XR_MAX_SPATIAL_ANCHOR_NAME_SIZE_MSFT]") - public String nameString() { return nnameString(address()); } - - /** Copies the specified encoded string to the {@code name} field. */ - public XrSpatialAnchorPersistenceNameMSFT name(@NativeType("char[XR_MAX_SPATIAL_ANCHOR_NAME_SIZE_MSFT]") ByteBuffer value) { nname(address(), value); return this; } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSpatialAnchorPersistenceNameMSFT set(XrSpatialAnchorPersistenceNameMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSpatialAnchorPersistenceNameMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSpatialAnchorPersistenceNameMSFT malloc() { - return wrap(XrSpatialAnchorPersistenceNameMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSpatialAnchorPersistenceNameMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSpatialAnchorPersistenceNameMSFT calloc() { - return wrap(XrSpatialAnchorPersistenceNameMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSpatialAnchorPersistenceNameMSFT} instance allocated with {@link BufferUtils}. */ - public static XrSpatialAnchorPersistenceNameMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSpatialAnchorPersistenceNameMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrSpatialAnchorPersistenceNameMSFT} instance for the specified memory address. */ - public static XrSpatialAnchorPersistenceNameMSFT create(long address) { - return wrap(XrSpatialAnchorPersistenceNameMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSpatialAnchorPersistenceNameMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrSpatialAnchorPersistenceNameMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSpatialAnchorPersistenceNameMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSpatialAnchorPersistenceNameMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSpatialAnchorPersistenceNameMSFT malloc(MemoryStack stack) { - return wrap(XrSpatialAnchorPersistenceNameMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSpatialAnchorPersistenceNameMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSpatialAnchorPersistenceNameMSFT calloc(MemoryStack stack) { - return wrap(XrSpatialAnchorPersistenceNameMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #name}. */ - public static ByteBuffer nname(long struct) { return memByteBuffer(struct + XrSpatialAnchorPersistenceNameMSFT.NAME, XR_MAX_SPATIAL_ANCHOR_NAME_SIZE_MSFT); } - /** Unsafe version of {@link #nameString}. */ - public static String nnameString(long struct) { return memUTF8(struct + XrSpatialAnchorPersistenceNameMSFT.NAME); } - - /** Unsafe version of {@link #name(ByteBuffer) name}. */ - public static void nname(long struct, ByteBuffer value) { - if (CHECKS) { - checkNT1(value); - checkGT(value, XR_MAX_SPATIAL_ANCHOR_NAME_SIZE_MSFT); - } - memCopy(memAddress(value), struct + XrSpatialAnchorPersistenceNameMSFT.NAME, value.remaining()); - } - - // ----------------------------------- - - /** An array of {@link XrSpatialAnchorPersistenceNameMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSpatialAnchorPersistenceNameMSFT ELEMENT_FACTORY = XrSpatialAnchorPersistenceNameMSFT.create(-1L); - - /** - * Creates a new {@code XrSpatialAnchorPersistenceNameMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSpatialAnchorPersistenceNameMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSpatialAnchorPersistenceNameMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link ByteBuffer} view of the {@code name} field. */ - @NativeType("char[XR_MAX_SPATIAL_ANCHOR_NAME_SIZE_MSFT]") - public ByteBuffer name() { return XrSpatialAnchorPersistenceNameMSFT.nname(address()); } - /** @return the null-terminated string stored in the {@code name} field. */ - @NativeType("char[XR_MAX_SPATIAL_ANCHOR_NAME_SIZE_MSFT]") - public String nameString() { return XrSpatialAnchorPersistenceNameMSFT.nnameString(address()); } - - /** Copies the specified encoded string to the {@code name} field. */ - public Buffer name(@NativeType("char[XR_MAX_SPATIAL_ANCHOR_NAME_SIZE_MSFT]") ByteBuffer value) { XrSpatialAnchorPersistenceNameMSFT.nname(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSpatialAnchorSpaceCreateInfoMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSpatialAnchorSpaceCreateInfoMSFT.java deleted file mode 100644 index 190e4c94..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSpatialAnchorSpaceCreateInfoMSFT.java +++ /dev/null @@ -1,343 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSpatialAnchorSpaceCreateInfoMSFT {
- *     XrStructureType type;
- *     void const * next;
- *     XrSpatialAnchorMSFT anchor;
- *     {@link XrPosef XrPosef} poseInAnchorSpace;
- * }
- */ -public class XrSpatialAnchorSpaceCreateInfoMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - ANCHOR, - POSEINANCHORSPACE; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(XrPosef.SIZEOF, XrPosef.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - ANCHOR = layout.offsetof(2); - POSEINANCHORSPACE = layout.offsetof(3); - } - - /** - * Creates a {@code XrSpatialAnchorSpaceCreateInfoMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSpatialAnchorSpaceCreateInfoMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code anchor} field. */ - @NativeType("XrSpatialAnchorMSFT") - public long anchor() { return nanchor(address()); } - /** @return a {@link XrPosef} view of the {@code poseInAnchorSpace} field. */ - public XrPosef poseInAnchorSpace() { return nposeInAnchorSpace(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrSpatialAnchorSpaceCreateInfoMSFT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link MSFTSpatialAnchor#XR_TYPE_SPATIAL_ANCHOR_SPACE_CREATE_INFO_MSFT TYPE_SPATIAL_ANCHOR_SPACE_CREATE_INFO_MSFT} value to the {@code type} field. */ - public XrSpatialAnchorSpaceCreateInfoMSFT type$Default() { return type(MSFTSpatialAnchor.XR_TYPE_SPATIAL_ANCHOR_SPACE_CREATE_INFO_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public XrSpatialAnchorSpaceCreateInfoMSFT next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code anchor} field. */ - public XrSpatialAnchorSpaceCreateInfoMSFT anchor(XrSpatialAnchorMSFT value) { nanchor(address(), value); return this; } - /** Copies the specified {@link XrPosef} to the {@code poseInAnchorSpace} field. */ - public XrSpatialAnchorSpaceCreateInfoMSFT poseInAnchorSpace(XrPosef value) { nposeInAnchorSpace(address(), value); return this; } - /** Passes the {@code poseInAnchorSpace} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrSpatialAnchorSpaceCreateInfoMSFT poseInAnchorSpace(java.util.function.Consumer consumer) { consumer.accept(poseInAnchorSpace()); return this; } - - /** Initializes this struct with the specified values. */ - public XrSpatialAnchorSpaceCreateInfoMSFT set( - int type, - long next, - XrSpatialAnchorMSFT anchor, - XrPosef poseInAnchorSpace - ) { - type(type); - next(next); - anchor(anchor); - poseInAnchorSpace(poseInAnchorSpace); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSpatialAnchorSpaceCreateInfoMSFT set(XrSpatialAnchorSpaceCreateInfoMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSpatialAnchorSpaceCreateInfoMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSpatialAnchorSpaceCreateInfoMSFT malloc() { - return wrap(XrSpatialAnchorSpaceCreateInfoMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSpatialAnchorSpaceCreateInfoMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSpatialAnchorSpaceCreateInfoMSFT calloc() { - return wrap(XrSpatialAnchorSpaceCreateInfoMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSpatialAnchorSpaceCreateInfoMSFT} instance allocated with {@link BufferUtils}. */ - public static XrSpatialAnchorSpaceCreateInfoMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSpatialAnchorSpaceCreateInfoMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrSpatialAnchorSpaceCreateInfoMSFT} instance for the specified memory address. */ - public static XrSpatialAnchorSpaceCreateInfoMSFT create(long address) { - return wrap(XrSpatialAnchorSpaceCreateInfoMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSpatialAnchorSpaceCreateInfoMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrSpatialAnchorSpaceCreateInfoMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSpatialAnchorSpaceCreateInfoMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSpatialAnchorSpaceCreateInfoMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSpatialAnchorSpaceCreateInfoMSFT malloc(MemoryStack stack) { - return wrap(XrSpatialAnchorSpaceCreateInfoMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSpatialAnchorSpaceCreateInfoMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSpatialAnchorSpaceCreateInfoMSFT calloc(MemoryStack stack) { - return wrap(XrSpatialAnchorSpaceCreateInfoMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSpatialAnchorSpaceCreateInfoMSFT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSpatialAnchorSpaceCreateInfoMSFT.NEXT); } - /** Unsafe version of {@link #anchor}. */ - public static long nanchor(long struct) { return memGetAddress(struct + XrSpatialAnchorSpaceCreateInfoMSFT.ANCHOR); } - /** Unsafe version of {@link #poseInAnchorSpace}. */ - public static XrPosef nposeInAnchorSpace(long struct) { return XrPosef.create(struct + XrSpatialAnchorSpaceCreateInfoMSFT.POSEINANCHORSPACE); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSpatialAnchorSpaceCreateInfoMSFT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSpatialAnchorSpaceCreateInfoMSFT.NEXT, value); } - /** Unsafe version of {@link #anchor(XrSpatialAnchorMSFT) anchor}. */ - public static void nanchor(long struct, XrSpatialAnchorMSFT value) { memPutAddress(struct + XrSpatialAnchorSpaceCreateInfoMSFT.ANCHOR, value.address()); } - /** Unsafe version of {@link #poseInAnchorSpace(XrPosef) poseInAnchorSpace}. */ - public static void nposeInAnchorSpace(long struct, XrPosef value) { memCopy(value.address(), struct + XrSpatialAnchorSpaceCreateInfoMSFT.POSEINANCHORSPACE, XrPosef.SIZEOF); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XrSpatialAnchorSpaceCreateInfoMSFT.ANCHOR)); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrSpatialAnchorSpaceCreateInfoMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSpatialAnchorSpaceCreateInfoMSFT ELEMENT_FACTORY = XrSpatialAnchorSpaceCreateInfoMSFT.create(-1L); - - /** - * Creates a new {@code XrSpatialAnchorSpaceCreateInfoMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSpatialAnchorSpaceCreateInfoMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSpatialAnchorSpaceCreateInfoMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSpatialAnchorSpaceCreateInfoMSFT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrSpatialAnchorSpaceCreateInfoMSFT.nnext(address()); } - /** @return the value of the {@code anchor} field. */ - @NativeType("XrSpatialAnchorMSFT") - public long anchor() { return XrSpatialAnchorSpaceCreateInfoMSFT.nanchor(address()); } - /** @return a {@link XrPosef} view of the {@code poseInAnchorSpace} field. */ - public XrPosef poseInAnchorSpace() { return XrSpatialAnchorSpaceCreateInfoMSFT.nposeInAnchorSpace(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSpatialAnchorSpaceCreateInfoMSFT.ntype(address(), value); return this; } - /** Sets the {@link MSFTSpatialAnchor#XR_TYPE_SPATIAL_ANCHOR_SPACE_CREATE_INFO_MSFT TYPE_SPATIAL_ANCHOR_SPACE_CREATE_INFO_MSFT} value to the {@code type} field. */ - public Buffer type$Default() { return type(MSFTSpatialAnchor.XR_TYPE_SPATIAL_ANCHOR_SPACE_CREATE_INFO_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrSpatialAnchorSpaceCreateInfoMSFT.nnext(address(), value); return this; } - /** Sets the specified value to the {@code anchor} field. */ - public Buffer anchor(XrSpatialAnchorMSFT value) { XrSpatialAnchorSpaceCreateInfoMSFT.nanchor(address(), value); return this; } - /** Copies the specified {@link XrPosef} to the {@code poseInAnchorSpace} field. */ - public Buffer poseInAnchorSpace(XrPosef value) { XrSpatialAnchorSpaceCreateInfoMSFT.nposeInAnchorSpace(address(), value); return this; } - /** Passes the {@code poseInAnchorSpace} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer poseInAnchorSpace(java.util.function.Consumer consumer) { consumer.accept(poseInAnchorSpace()); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSpatialAnchorStoreConnectionMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSpatialAnchorStoreConnectionMSFT.java deleted file mode 100644 index 85fe6973..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSpatialAnchorStoreConnectionMSFT.java +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.openxr; - -public class XrSpatialAnchorStoreConnectionMSFT extends DispatchableHandle { - public XrSpatialAnchorStoreConnectionMSFT(long handle, DispatchableHandle session) { - super(handle, session.getCapabilities()); - } - - public XrSpatialAnchorStoreConnectionMSFT(long handle, XRCapabilities capabilities) { - super(handle, capabilities); - } -} diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSpatialGraphNodeSpaceCreateInfoMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSpatialGraphNodeSpaceCreateInfoMSFT.java deleted file mode 100644 index 1d59de27..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSpatialGraphNodeSpaceCreateInfoMSFT.java +++ /dev/null @@ -1,363 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSpatialGraphNodeSpaceCreateInfoMSFT {
- *     XrStructureType type;
- *     void const * next;
- *     XrSpatialGraphNodeTypeMSFT nodeType;
- *     uint8_t nodeId[16];
- *     {@link XrPosef XrPosef} pose;
- * }
- */ -public class XrSpatialGraphNodeSpaceCreateInfoMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - NODETYPE, - NODEID, - POSE; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4), - __array(1, 16), - __member(XrPosef.SIZEOF, XrPosef.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - NODETYPE = layout.offsetof(2); - NODEID = layout.offsetof(3); - POSE = layout.offsetof(4); - } - - /** - * Creates a {@code XrSpatialGraphNodeSpaceCreateInfoMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSpatialGraphNodeSpaceCreateInfoMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code nodeType} field. */ - @NativeType("XrSpatialGraphNodeTypeMSFT") - public int nodeType() { return nnodeType(address()); } - /** @return a {@link ByteBuffer} view of the {@code nodeId} field. */ - @NativeType("uint8_t[16]") - public ByteBuffer nodeId() { return nnodeId(address()); } - /** @return the value at the specified index of the {@code nodeId} field. */ - @NativeType("uint8_t") - public byte nodeId(int index) { return nnodeId(address(), index); } - /** @return a {@link XrPosef} view of the {@code pose} field. */ - public XrPosef pose() { return npose(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrSpatialGraphNodeSpaceCreateInfoMSFT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link MSFTSpatialGraphBridge#XR_TYPE_SPATIAL_GRAPH_NODE_SPACE_CREATE_INFO_MSFT TYPE_SPATIAL_GRAPH_NODE_SPACE_CREATE_INFO_MSFT} value to the {@code type} field. */ - public XrSpatialGraphNodeSpaceCreateInfoMSFT type$Default() { return type(MSFTSpatialGraphBridge.XR_TYPE_SPATIAL_GRAPH_NODE_SPACE_CREATE_INFO_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public XrSpatialGraphNodeSpaceCreateInfoMSFT next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code nodeType} field. */ - public XrSpatialGraphNodeSpaceCreateInfoMSFT nodeType(@NativeType("XrSpatialGraphNodeTypeMSFT") int value) { nnodeType(address(), value); return this; } - /** Copies the specified {@link ByteBuffer} to the {@code nodeId} field. */ - public XrSpatialGraphNodeSpaceCreateInfoMSFT nodeId(@NativeType("uint8_t[16]") ByteBuffer value) { nnodeId(address(), value); return this; } - /** Sets the specified value at the specified index of the {@code nodeId} field. */ - public XrSpatialGraphNodeSpaceCreateInfoMSFT nodeId(int index, @NativeType("uint8_t") byte value) { nnodeId(address(), index, value); return this; } - /** Copies the specified {@link XrPosef} to the {@code pose} field. */ - public XrSpatialGraphNodeSpaceCreateInfoMSFT pose(XrPosef value) { npose(address(), value); return this; } - /** Passes the {@code pose} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrSpatialGraphNodeSpaceCreateInfoMSFT pose(java.util.function.Consumer consumer) { consumer.accept(pose()); return this; } - - /** Initializes this struct with the specified values. */ - public XrSpatialGraphNodeSpaceCreateInfoMSFT set( - int type, - long next, - int nodeType, - ByteBuffer nodeId, - XrPosef pose - ) { - type(type); - next(next); - nodeType(nodeType); - nodeId(nodeId); - pose(pose); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSpatialGraphNodeSpaceCreateInfoMSFT set(XrSpatialGraphNodeSpaceCreateInfoMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSpatialGraphNodeSpaceCreateInfoMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSpatialGraphNodeSpaceCreateInfoMSFT malloc() { - return wrap(XrSpatialGraphNodeSpaceCreateInfoMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSpatialGraphNodeSpaceCreateInfoMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSpatialGraphNodeSpaceCreateInfoMSFT calloc() { - return wrap(XrSpatialGraphNodeSpaceCreateInfoMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSpatialGraphNodeSpaceCreateInfoMSFT} instance allocated with {@link BufferUtils}. */ - public static XrSpatialGraphNodeSpaceCreateInfoMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSpatialGraphNodeSpaceCreateInfoMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrSpatialGraphNodeSpaceCreateInfoMSFT} instance for the specified memory address. */ - public static XrSpatialGraphNodeSpaceCreateInfoMSFT create(long address) { - return wrap(XrSpatialGraphNodeSpaceCreateInfoMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSpatialGraphNodeSpaceCreateInfoMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrSpatialGraphNodeSpaceCreateInfoMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSpatialGraphNodeSpaceCreateInfoMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSpatialGraphNodeSpaceCreateInfoMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSpatialGraphNodeSpaceCreateInfoMSFT malloc(MemoryStack stack) { - return wrap(XrSpatialGraphNodeSpaceCreateInfoMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSpatialGraphNodeSpaceCreateInfoMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSpatialGraphNodeSpaceCreateInfoMSFT calloc(MemoryStack stack) { - return wrap(XrSpatialGraphNodeSpaceCreateInfoMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSpatialGraphNodeSpaceCreateInfoMSFT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSpatialGraphNodeSpaceCreateInfoMSFT.NEXT); } - /** Unsafe version of {@link #nodeType}. */ - public static int nnodeType(long struct) { return UNSAFE.getInt(null, struct + XrSpatialGraphNodeSpaceCreateInfoMSFT.NODETYPE); } - /** Unsafe version of {@link #nodeId}. */ - public static ByteBuffer nnodeId(long struct) { return memByteBuffer(struct + XrSpatialGraphNodeSpaceCreateInfoMSFT.NODEID, 16); } - /** Unsafe version of {@link #nodeId(int) nodeId}. */ - public static byte nnodeId(long struct, int index) { - return UNSAFE.getByte(null, struct + XrSpatialGraphNodeSpaceCreateInfoMSFT.NODEID + check(index, 16) * 1); - } - /** Unsafe version of {@link #pose}. */ - public static XrPosef npose(long struct) { return XrPosef.create(struct + XrSpatialGraphNodeSpaceCreateInfoMSFT.POSE); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSpatialGraphNodeSpaceCreateInfoMSFT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSpatialGraphNodeSpaceCreateInfoMSFT.NEXT, value); } - /** Unsafe version of {@link #nodeType(int) nodeType}. */ - public static void nnodeType(long struct, int value) { UNSAFE.putInt(null, struct + XrSpatialGraphNodeSpaceCreateInfoMSFT.NODETYPE, value); } - /** Unsafe version of {@link #nodeId(ByteBuffer) nodeId}. */ - public static void nnodeId(long struct, ByteBuffer value) { - if (CHECKS) { checkGT(value, 16); } - memCopy(memAddress(value), struct + XrSpatialGraphNodeSpaceCreateInfoMSFT.NODEID, value.remaining() * 1); - } - /** Unsafe version of {@link #nodeId(int, byte) nodeId}. */ - public static void nnodeId(long struct, int index, byte value) { - UNSAFE.putByte(null, struct + XrSpatialGraphNodeSpaceCreateInfoMSFT.NODEID + check(index, 16) * 1, value); - } - /** Unsafe version of {@link #pose(XrPosef) pose}. */ - public static void npose(long struct, XrPosef value) { memCopy(value.address(), struct + XrSpatialGraphNodeSpaceCreateInfoMSFT.POSE, XrPosef.SIZEOF); } - - // ----------------------------------- - - /** An array of {@link XrSpatialGraphNodeSpaceCreateInfoMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSpatialGraphNodeSpaceCreateInfoMSFT ELEMENT_FACTORY = XrSpatialGraphNodeSpaceCreateInfoMSFT.create(-1L); - - /** - * Creates a new {@code XrSpatialGraphNodeSpaceCreateInfoMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSpatialGraphNodeSpaceCreateInfoMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSpatialGraphNodeSpaceCreateInfoMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSpatialGraphNodeSpaceCreateInfoMSFT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrSpatialGraphNodeSpaceCreateInfoMSFT.nnext(address()); } - /** @return the value of the {@code nodeType} field. */ - @NativeType("XrSpatialGraphNodeTypeMSFT") - public int nodeType() { return XrSpatialGraphNodeSpaceCreateInfoMSFT.nnodeType(address()); } - /** @return a {@link ByteBuffer} view of the {@code nodeId} field. */ - @NativeType("uint8_t[16]") - public ByteBuffer nodeId() { return XrSpatialGraphNodeSpaceCreateInfoMSFT.nnodeId(address()); } - /** @return the value at the specified index of the {@code nodeId} field. */ - @NativeType("uint8_t") - public byte nodeId(int index) { return XrSpatialGraphNodeSpaceCreateInfoMSFT.nnodeId(address(), index); } - /** @return a {@link XrPosef} view of the {@code pose} field. */ - public XrPosef pose() { return XrSpatialGraphNodeSpaceCreateInfoMSFT.npose(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSpatialGraphNodeSpaceCreateInfoMSFT.ntype(address(), value); return this; } - /** Sets the {@link MSFTSpatialGraphBridge#XR_TYPE_SPATIAL_GRAPH_NODE_SPACE_CREATE_INFO_MSFT TYPE_SPATIAL_GRAPH_NODE_SPACE_CREATE_INFO_MSFT} value to the {@code type} field. */ - public Buffer type$Default() { return type(MSFTSpatialGraphBridge.XR_TYPE_SPATIAL_GRAPH_NODE_SPACE_CREATE_INFO_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrSpatialGraphNodeSpaceCreateInfoMSFT.nnext(address(), value); return this; } - /** Sets the specified value to the {@code nodeType} field. */ - public Buffer nodeType(@NativeType("XrSpatialGraphNodeTypeMSFT") int value) { XrSpatialGraphNodeSpaceCreateInfoMSFT.nnodeType(address(), value); return this; } - /** Copies the specified {@link ByteBuffer} to the {@code nodeId} field. */ - public Buffer nodeId(@NativeType("uint8_t[16]") ByteBuffer value) { XrSpatialGraphNodeSpaceCreateInfoMSFT.nnodeId(address(), value); return this; } - /** Sets the specified value at the specified index of the {@code nodeId} field. */ - public Buffer nodeId(int index, @NativeType("uint8_t") byte value) { XrSpatialGraphNodeSpaceCreateInfoMSFT.nnodeId(address(), index, value); return this; } - /** Copies the specified {@link XrPosef} to the {@code pose} field. */ - public Buffer pose(XrPosef value) { XrSpatialGraphNodeSpaceCreateInfoMSFT.npose(address(), value); return this; } - /** Passes the {@code pose} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer pose(java.util.function.Consumer consumer) { consumer.accept(pose()); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSwapchain.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSwapchain.java deleted file mode 100644 index 2f27c608..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSwapchain.java +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.openxr; - -public class XrSwapchain extends DispatchableHandle { - public XrSwapchain(long handle, DispatchableHandle session) { - super(handle, session.getCapabilities()); - } - - public XrSwapchain(long handle, XRCapabilities capabilities) { - super(handle, capabilities); - } -} diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSwapchainCreateInfo.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSwapchainCreateInfo.java deleted file mode 100644 index 6cb700ee..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSwapchainCreateInfo.java +++ /dev/null @@ -1,459 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSwapchainCreateInfo {
- *     XrStructureType type;
- *     void const * next;
- *     XrSwapchainCreateFlags createFlags;
- *     XrSwapchainUsageFlags usageFlags;
- *     int64_t format;
- *     uint32_t sampleCount;
- *     uint32_t width;
- *     uint32_t height;
- *     uint32_t faceCount;
- *     uint32_t arraySize;
- *     uint32_t mipCount;
- * }
- */ -public class XrSwapchainCreateInfo extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - CREATEFLAGS, - USAGEFLAGS, - FORMAT, - SAMPLECOUNT, - WIDTH, - HEIGHT, - FACECOUNT, - ARRAYSIZE, - MIPCOUNT; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(8), - __member(8), - __member(8), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - CREATEFLAGS = layout.offsetof(2); - USAGEFLAGS = layout.offsetof(3); - FORMAT = layout.offsetof(4); - SAMPLECOUNT = layout.offsetof(5); - WIDTH = layout.offsetof(6); - HEIGHT = layout.offsetof(7); - FACECOUNT = layout.offsetof(8); - ARRAYSIZE = layout.offsetof(9); - MIPCOUNT = layout.offsetof(10); - } - - /** - * Creates a {@code XrSwapchainCreateInfo} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSwapchainCreateInfo(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code createFlags} field. */ - @NativeType("XrSwapchainCreateFlags") - public long createFlags() { return ncreateFlags(address()); } - /** @return the value of the {@code usageFlags} field. */ - @NativeType("XrSwapchainUsageFlags") - public long usageFlags() { return nusageFlags(address()); } - /** @return the value of the {@code format} field. */ - @NativeType("int64_t") - public long format() { return nformat(address()); } - /** @return the value of the {@code sampleCount} field. */ - @NativeType("uint32_t") - public int sampleCount() { return nsampleCount(address()); } - /** @return the value of the {@code width} field. */ - @NativeType("uint32_t") - public int width() { return nwidth(address()); } - /** @return the value of the {@code height} field. */ - @NativeType("uint32_t") - public int height() { return nheight(address()); } - /** @return the value of the {@code faceCount} field. */ - @NativeType("uint32_t") - public int faceCount() { return nfaceCount(address()); } - /** @return the value of the {@code arraySize} field. */ - @NativeType("uint32_t") - public int arraySize() { return narraySize(address()); } - /** @return the value of the {@code mipCount} field. */ - @NativeType("uint32_t") - public int mipCount() { return nmipCount(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrSwapchainCreateInfo type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_SWAPCHAIN_CREATE_INFO TYPE_SWAPCHAIN_CREATE_INFO} value to the {@code type} field. */ - public XrSwapchainCreateInfo type$Default() { return type(XR10.XR_TYPE_SWAPCHAIN_CREATE_INFO); } - /** Sets the specified value to the {@code next} field. */ - public XrSwapchainCreateInfo next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code createFlags} field. */ - public XrSwapchainCreateInfo createFlags(@NativeType("XrSwapchainCreateFlags") long value) { ncreateFlags(address(), value); return this; } - /** Sets the specified value to the {@code usageFlags} field. */ - public XrSwapchainCreateInfo usageFlags(@NativeType("XrSwapchainUsageFlags") long value) { nusageFlags(address(), value); return this; } - /** Sets the specified value to the {@code format} field. */ - public XrSwapchainCreateInfo format(@NativeType("int64_t") long value) { nformat(address(), value); return this; } - /** Sets the specified value to the {@code sampleCount} field. */ - public XrSwapchainCreateInfo sampleCount(@NativeType("uint32_t") int value) { nsampleCount(address(), value); return this; } - /** Sets the specified value to the {@code width} field. */ - public XrSwapchainCreateInfo width(@NativeType("uint32_t") int value) { nwidth(address(), value); return this; } - /** Sets the specified value to the {@code height} field. */ - public XrSwapchainCreateInfo height(@NativeType("uint32_t") int value) { nheight(address(), value); return this; } - /** Sets the specified value to the {@code faceCount} field. */ - public XrSwapchainCreateInfo faceCount(@NativeType("uint32_t") int value) { nfaceCount(address(), value); return this; } - /** Sets the specified value to the {@code arraySize} field. */ - public XrSwapchainCreateInfo arraySize(@NativeType("uint32_t") int value) { narraySize(address(), value); return this; } - /** Sets the specified value to the {@code mipCount} field. */ - public XrSwapchainCreateInfo mipCount(@NativeType("uint32_t") int value) { nmipCount(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrSwapchainCreateInfo set( - int type, - long next, - long createFlags, - long usageFlags, - long format, - int sampleCount, - int width, - int height, - int faceCount, - int arraySize, - int mipCount - ) { - type(type); - next(next); - createFlags(createFlags); - usageFlags(usageFlags); - format(format); - sampleCount(sampleCount); - width(width); - height(height); - faceCount(faceCount); - arraySize(arraySize); - mipCount(mipCount); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSwapchainCreateInfo set(XrSwapchainCreateInfo src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSwapchainCreateInfo} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSwapchainCreateInfo malloc() { - return wrap(XrSwapchainCreateInfo.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSwapchainCreateInfo} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSwapchainCreateInfo calloc() { - return wrap(XrSwapchainCreateInfo.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSwapchainCreateInfo} instance allocated with {@link BufferUtils}. */ - public static XrSwapchainCreateInfo create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSwapchainCreateInfo.class, memAddress(container), container); - } - - /** Returns a new {@code XrSwapchainCreateInfo} instance for the specified memory address. */ - public static XrSwapchainCreateInfo create(long address) { - return wrap(XrSwapchainCreateInfo.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSwapchainCreateInfo createSafe(long address) { - return address == NULL ? null : wrap(XrSwapchainCreateInfo.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSwapchainCreateInfo.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSwapchainCreateInfo} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSwapchainCreateInfo malloc(MemoryStack stack) { - return wrap(XrSwapchainCreateInfo.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSwapchainCreateInfo} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSwapchainCreateInfo calloc(MemoryStack stack) { - return wrap(XrSwapchainCreateInfo.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSwapchainCreateInfo.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSwapchainCreateInfo.NEXT); } - /** Unsafe version of {@link #createFlags}. */ - public static long ncreateFlags(long struct) { return UNSAFE.getLong(null, struct + XrSwapchainCreateInfo.CREATEFLAGS); } - /** Unsafe version of {@link #usageFlags}. */ - public static long nusageFlags(long struct) { return UNSAFE.getLong(null, struct + XrSwapchainCreateInfo.USAGEFLAGS); } - /** Unsafe version of {@link #format}. */ - public static long nformat(long struct) { return UNSAFE.getLong(null, struct + XrSwapchainCreateInfo.FORMAT); } - /** Unsafe version of {@link #sampleCount}. */ - public static int nsampleCount(long struct) { return UNSAFE.getInt(null, struct + XrSwapchainCreateInfo.SAMPLECOUNT); } - /** Unsafe version of {@link #width}. */ - public static int nwidth(long struct) { return UNSAFE.getInt(null, struct + XrSwapchainCreateInfo.WIDTH); } - /** Unsafe version of {@link #height}. */ - public static int nheight(long struct) { return UNSAFE.getInt(null, struct + XrSwapchainCreateInfo.HEIGHT); } - /** Unsafe version of {@link #faceCount}. */ - public static int nfaceCount(long struct) { return UNSAFE.getInt(null, struct + XrSwapchainCreateInfo.FACECOUNT); } - /** Unsafe version of {@link #arraySize}. */ - public static int narraySize(long struct) { return UNSAFE.getInt(null, struct + XrSwapchainCreateInfo.ARRAYSIZE); } - /** Unsafe version of {@link #mipCount}. */ - public static int nmipCount(long struct) { return UNSAFE.getInt(null, struct + XrSwapchainCreateInfo.MIPCOUNT); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSwapchainCreateInfo.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSwapchainCreateInfo.NEXT, value); } - /** Unsafe version of {@link #createFlags(long) createFlags}. */ - public static void ncreateFlags(long struct, long value) { UNSAFE.putLong(null, struct + XrSwapchainCreateInfo.CREATEFLAGS, value); } - /** Unsafe version of {@link #usageFlags(long) usageFlags}. */ - public static void nusageFlags(long struct, long value) { UNSAFE.putLong(null, struct + XrSwapchainCreateInfo.USAGEFLAGS, value); } - /** Unsafe version of {@link #format(long) format}. */ - public static void nformat(long struct, long value) { UNSAFE.putLong(null, struct + XrSwapchainCreateInfo.FORMAT, value); } - /** Unsafe version of {@link #sampleCount(int) sampleCount}. */ - public static void nsampleCount(long struct, int value) { UNSAFE.putInt(null, struct + XrSwapchainCreateInfo.SAMPLECOUNT, value); } - /** Unsafe version of {@link #width(int) width}. */ - public static void nwidth(long struct, int value) { UNSAFE.putInt(null, struct + XrSwapchainCreateInfo.WIDTH, value); } - /** Unsafe version of {@link #height(int) height}. */ - public static void nheight(long struct, int value) { UNSAFE.putInt(null, struct + XrSwapchainCreateInfo.HEIGHT, value); } - /** Unsafe version of {@link #faceCount(int) faceCount}. */ - public static void nfaceCount(long struct, int value) { UNSAFE.putInt(null, struct + XrSwapchainCreateInfo.FACECOUNT, value); } - /** Unsafe version of {@link #arraySize(int) arraySize}. */ - public static void narraySize(long struct, int value) { UNSAFE.putInt(null, struct + XrSwapchainCreateInfo.ARRAYSIZE, value); } - /** Unsafe version of {@link #mipCount(int) mipCount}. */ - public static void nmipCount(long struct, int value) { UNSAFE.putInt(null, struct + XrSwapchainCreateInfo.MIPCOUNT, value); } - - // ----------------------------------- - - /** An array of {@link XrSwapchainCreateInfo} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSwapchainCreateInfo ELEMENT_FACTORY = XrSwapchainCreateInfo.create(-1L); - - /** - * Creates a new {@code XrSwapchainCreateInfo.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSwapchainCreateInfo#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSwapchainCreateInfo getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSwapchainCreateInfo.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrSwapchainCreateInfo.nnext(address()); } - /** @return the value of the {@code createFlags} field. */ - @NativeType("XrSwapchainCreateFlags") - public long createFlags() { return XrSwapchainCreateInfo.ncreateFlags(address()); } - /** @return the value of the {@code usageFlags} field. */ - @NativeType("XrSwapchainUsageFlags") - public long usageFlags() { return XrSwapchainCreateInfo.nusageFlags(address()); } - /** @return the value of the {@code format} field. */ - @NativeType("int64_t") - public long format() { return XrSwapchainCreateInfo.nformat(address()); } - /** @return the value of the {@code sampleCount} field. */ - @NativeType("uint32_t") - public int sampleCount() { return XrSwapchainCreateInfo.nsampleCount(address()); } - /** @return the value of the {@code width} field. */ - @NativeType("uint32_t") - public int width() { return XrSwapchainCreateInfo.nwidth(address()); } - /** @return the value of the {@code height} field. */ - @NativeType("uint32_t") - public int height() { return XrSwapchainCreateInfo.nheight(address()); } - /** @return the value of the {@code faceCount} field. */ - @NativeType("uint32_t") - public int faceCount() { return XrSwapchainCreateInfo.nfaceCount(address()); } - /** @return the value of the {@code arraySize} field. */ - @NativeType("uint32_t") - public int arraySize() { return XrSwapchainCreateInfo.narraySize(address()); } - /** @return the value of the {@code mipCount} field. */ - @NativeType("uint32_t") - public int mipCount() { return XrSwapchainCreateInfo.nmipCount(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSwapchainCreateInfo.ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_SWAPCHAIN_CREATE_INFO TYPE_SWAPCHAIN_CREATE_INFO} value to the {@code type} field. */ - public Buffer type$Default() { return type(XR10.XR_TYPE_SWAPCHAIN_CREATE_INFO); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrSwapchainCreateInfo.nnext(address(), value); return this; } - /** Sets the specified value to the {@code createFlags} field. */ - public Buffer createFlags(@NativeType("XrSwapchainCreateFlags") long value) { XrSwapchainCreateInfo.ncreateFlags(address(), value); return this; } - /** Sets the specified value to the {@code usageFlags} field. */ - public Buffer usageFlags(@NativeType("XrSwapchainUsageFlags") long value) { XrSwapchainCreateInfo.nusageFlags(address(), value); return this; } - /** Sets the specified value to the {@code format} field. */ - public Buffer format(@NativeType("int64_t") long value) { XrSwapchainCreateInfo.nformat(address(), value); return this; } - /** Sets the specified value to the {@code sampleCount} field. */ - public Buffer sampleCount(@NativeType("uint32_t") int value) { XrSwapchainCreateInfo.nsampleCount(address(), value); return this; } - /** Sets the specified value to the {@code width} field. */ - public Buffer width(@NativeType("uint32_t") int value) { XrSwapchainCreateInfo.nwidth(address(), value); return this; } - /** Sets the specified value to the {@code height} field. */ - public Buffer height(@NativeType("uint32_t") int value) { XrSwapchainCreateInfo.nheight(address(), value); return this; } - /** Sets the specified value to the {@code faceCount} field. */ - public Buffer faceCount(@NativeType("uint32_t") int value) { XrSwapchainCreateInfo.nfaceCount(address(), value); return this; } - /** Sets the specified value to the {@code arraySize} field. */ - public Buffer arraySize(@NativeType("uint32_t") int value) { XrSwapchainCreateInfo.narraySize(address(), value); return this; } - /** Sets the specified value to the {@code mipCount} field. */ - public Buffer mipCount(@NativeType("uint32_t") int value) { XrSwapchainCreateInfo.nmipCount(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSwapchainCreateInfoFoveationFB.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSwapchainCreateInfoFoveationFB.java deleted file mode 100644 index 153b9222..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSwapchainCreateInfoFoveationFB.java +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSwapchainCreateInfoFoveationFB {
- *     XrStructureType type;
- *     void * next;
- *     XrSwapchainCreateFoveationFlagsFB flags;
- * }
- */ -public class XrSwapchainCreateInfoFoveationFB extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - FLAGS; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(8) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - FLAGS = layout.offsetof(2); - } - - /** - * Creates a {@code XrSwapchainCreateInfoFoveationFB} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSwapchainCreateInfoFoveationFB(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return the value of the {@code flags} field. */ - @NativeType("XrSwapchainCreateFoveationFlagsFB") - public long flags() { return nflags(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrSwapchainCreateInfoFoveationFB type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link FBFoveation#XR_TYPE_SWAPCHAIN_CREATE_INFO_FOVEATION_FB TYPE_SWAPCHAIN_CREATE_INFO_FOVEATION_FB} value to the {@code type} field. */ - public XrSwapchainCreateInfoFoveationFB type$Default() { return type(FBFoveation.XR_TYPE_SWAPCHAIN_CREATE_INFO_FOVEATION_FB); } - /** Sets the specified value to the {@code next} field. */ - public XrSwapchainCreateInfoFoveationFB next(@NativeType("void *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code flags} field. */ - public XrSwapchainCreateInfoFoveationFB flags(@NativeType("XrSwapchainCreateFoveationFlagsFB") long value) { nflags(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrSwapchainCreateInfoFoveationFB set( - int type, - long next, - long flags - ) { - type(type); - next(next); - flags(flags); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSwapchainCreateInfoFoveationFB set(XrSwapchainCreateInfoFoveationFB src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSwapchainCreateInfoFoveationFB} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSwapchainCreateInfoFoveationFB malloc() { - return wrap(XrSwapchainCreateInfoFoveationFB.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSwapchainCreateInfoFoveationFB} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSwapchainCreateInfoFoveationFB calloc() { - return wrap(XrSwapchainCreateInfoFoveationFB.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSwapchainCreateInfoFoveationFB} instance allocated with {@link BufferUtils}. */ - public static XrSwapchainCreateInfoFoveationFB create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSwapchainCreateInfoFoveationFB.class, memAddress(container), container); - } - - /** Returns a new {@code XrSwapchainCreateInfoFoveationFB} instance for the specified memory address. */ - public static XrSwapchainCreateInfoFoveationFB create(long address) { - return wrap(XrSwapchainCreateInfoFoveationFB.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSwapchainCreateInfoFoveationFB createSafe(long address) { - return address == NULL ? null : wrap(XrSwapchainCreateInfoFoveationFB.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSwapchainCreateInfoFoveationFB.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSwapchainCreateInfoFoveationFB} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSwapchainCreateInfoFoveationFB malloc(MemoryStack stack) { - return wrap(XrSwapchainCreateInfoFoveationFB.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSwapchainCreateInfoFoveationFB} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSwapchainCreateInfoFoveationFB calloc(MemoryStack stack) { - return wrap(XrSwapchainCreateInfoFoveationFB.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSwapchainCreateInfoFoveationFB.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSwapchainCreateInfoFoveationFB.NEXT); } - /** Unsafe version of {@link #flags}. */ - public static long nflags(long struct) { return UNSAFE.getLong(null, struct + XrSwapchainCreateInfoFoveationFB.FLAGS); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSwapchainCreateInfoFoveationFB.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSwapchainCreateInfoFoveationFB.NEXT, value); } - /** Unsafe version of {@link #flags(long) flags}. */ - public static void nflags(long struct, long value) { UNSAFE.putLong(null, struct + XrSwapchainCreateInfoFoveationFB.FLAGS, value); } - - // ----------------------------------- - - /** An array of {@link XrSwapchainCreateInfoFoveationFB} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSwapchainCreateInfoFoveationFB ELEMENT_FACTORY = XrSwapchainCreateInfoFoveationFB.create(-1L); - - /** - * Creates a new {@code XrSwapchainCreateInfoFoveationFB.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSwapchainCreateInfoFoveationFB#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSwapchainCreateInfoFoveationFB getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSwapchainCreateInfoFoveationFB.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrSwapchainCreateInfoFoveationFB.nnext(address()); } - /** @return the value of the {@code flags} field. */ - @NativeType("XrSwapchainCreateFoveationFlagsFB") - public long flags() { return XrSwapchainCreateInfoFoveationFB.nflags(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSwapchainCreateInfoFoveationFB.ntype(address(), value); return this; } - /** Sets the {@link FBFoveation#XR_TYPE_SWAPCHAIN_CREATE_INFO_FOVEATION_FB TYPE_SWAPCHAIN_CREATE_INFO_FOVEATION_FB} value to the {@code type} field. */ - public Buffer type$Default() { return type(FBFoveation.XR_TYPE_SWAPCHAIN_CREATE_INFO_FOVEATION_FB); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrSwapchainCreateInfoFoveationFB.nnext(address(), value); return this; } - /** Sets the specified value to the {@code flags} field. */ - public Buffer flags(@NativeType("XrSwapchainCreateFoveationFlagsFB") long value) { XrSwapchainCreateInfoFoveationFB.nflags(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSwapchainImageAcquireInfo.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSwapchainImageAcquireInfo.java deleted file mode 100644 index b2b6e337..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSwapchainImageAcquireInfo.java +++ /dev/null @@ -1,279 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSwapchainImageAcquireInfo {
- *     XrStructureType type;
- *     void const * next;
- * }
- */ -public class XrSwapchainImageAcquireInfo extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - } - - /** - * Creates a {@code XrSwapchainImageAcquireInfo} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSwapchainImageAcquireInfo(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrSwapchainImageAcquireInfo type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_SWAPCHAIN_IMAGE_ACQUIRE_INFO TYPE_SWAPCHAIN_IMAGE_ACQUIRE_INFO} value to the {@code type} field. */ - public XrSwapchainImageAcquireInfo type$Default() { return type(XR10.XR_TYPE_SWAPCHAIN_IMAGE_ACQUIRE_INFO); } - /** Sets the specified value to the {@code next} field. */ - public XrSwapchainImageAcquireInfo next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrSwapchainImageAcquireInfo set( - int type, - long next - ) { - type(type); - next(next); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSwapchainImageAcquireInfo set(XrSwapchainImageAcquireInfo src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSwapchainImageAcquireInfo} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSwapchainImageAcquireInfo malloc() { - return wrap(XrSwapchainImageAcquireInfo.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSwapchainImageAcquireInfo} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSwapchainImageAcquireInfo calloc() { - return wrap(XrSwapchainImageAcquireInfo.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSwapchainImageAcquireInfo} instance allocated with {@link BufferUtils}. */ - public static XrSwapchainImageAcquireInfo create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSwapchainImageAcquireInfo.class, memAddress(container), container); - } - - /** Returns a new {@code XrSwapchainImageAcquireInfo} instance for the specified memory address. */ - public static XrSwapchainImageAcquireInfo create(long address) { - return wrap(XrSwapchainImageAcquireInfo.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSwapchainImageAcquireInfo createSafe(long address) { - return address == NULL ? null : wrap(XrSwapchainImageAcquireInfo.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSwapchainImageAcquireInfo.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSwapchainImageAcquireInfo} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSwapchainImageAcquireInfo malloc(MemoryStack stack) { - return wrap(XrSwapchainImageAcquireInfo.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSwapchainImageAcquireInfo} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSwapchainImageAcquireInfo calloc(MemoryStack stack) { - return wrap(XrSwapchainImageAcquireInfo.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSwapchainImageAcquireInfo.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSwapchainImageAcquireInfo.NEXT); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSwapchainImageAcquireInfo.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSwapchainImageAcquireInfo.NEXT, value); } - - // ----------------------------------- - - /** An array of {@link XrSwapchainImageAcquireInfo} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSwapchainImageAcquireInfo ELEMENT_FACTORY = XrSwapchainImageAcquireInfo.create(-1L); - - /** - * Creates a new {@code XrSwapchainImageAcquireInfo.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSwapchainImageAcquireInfo#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSwapchainImageAcquireInfo getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSwapchainImageAcquireInfo.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrSwapchainImageAcquireInfo.nnext(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSwapchainImageAcquireInfo.ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_SWAPCHAIN_IMAGE_ACQUIRE_INFO TYPE_SWAPCHAIN_IMAGE_ACQUIRE_INFO} value to the {@code type} field. */ - public Buffer type$Default() { return type(XR10.XR_TYPE_SWAPCHAIN_IMAGE_ACQUIRE_INFO); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrSwapchainImageAcquireInfo.nnext(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSwapchainImageBaseHeader.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSwapchainImageBaseHeader.java deleted file mode 100644 index 6a311361..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSwapchainImageBaseHeader.java +++ /dev/null @@ -1,275 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSwapchainImageBaseHeader {
- *     XrStructureType type;
- *     void * next;
- * }
- */ -public class XrSwapchainImageBaseHeader extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - } - - /** - * Creates a {@code XrSwapchainImageBaseHeader} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSwapchainImageBaseHeader(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrSwapchainImageBaseHeader type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the specified value to the {@code next} field. */ - public XrSwapchainImageBaseHeader next(@NativeType("void *") long value) { nnext(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrSwapchainImageBaseHeader set( - int type, - long next - ) { - type(type); - next(next); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSwapchainImageBaseHeader set(XrSwapchainImageBaseHeader src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSwapchainImageBaseHeader} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSwapchainImageBaseHeader malloc() { - return wrap(XrSwapchainImageBaseHeader.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSwapchainImageBaseHeader} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSwapchainImageBaseHeader calloc() { - return wrap(XrSwapchainImageBaseHeader.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSwapchainImageBaseHeader} instance allocated with {@link BufferUtils}. */ - public static XrSwapchainImageBaseHeader create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSwapchainImageBaseHeader.class, memAddress(container), container); - } - - /** Returns a new {@code XrSwapchainImageBaseHeader} instance for the specified memory address. */ - public static XrSwapchainImageBaseHeader create(long address) { - return wrap(XrSwapchainImageBaseHeader.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSwapchainImageBaseHeader createSafe(long address) { - return address == NULL ? null : wrap(XrSwapchainImageBaseHeader.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSwapchainImageBaseHeader.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSwapchainImageBaseHeader} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSwapchainImageBaseHeader malloc(MemoryStack stack) { - return wrap(XrSwapchainImageBaseHeader.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSwapchainImageBaseHeader} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSwapchainImageBaseHeader calloc(MemoryStack stack) { - return wrap(XrSwapchainImageBaseHeader.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSwapchainImageBaseHeader.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSwapchainImageBaseHeader.NEXT); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSwapchainImageBaseHeader.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSwapchainImageBaseHeader.NEXT, value); } - - // ----------------------------------- - - /** An array of {@link XrSwapchainImageBaseHeader} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSwapchainImageBaseHeader ELEMENT_FACTORY = XrSwapchainImageBaseHeader.create(-1L); - - /** - * Creates a new {@code XrSwapchainImageBaseHeader.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSwapchainImageBaseHeader#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSwapchainImageBaseHeader getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSwapchainImageBaseHeader.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrSwapchainImageBaseHeader.nnext(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSwapchainImageBaseHeader.ntype(address(), value); return this; } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrSwapchainImageBaseHeader.nnext(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSwapchainImageOpenGLESKHR.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSwapchainImageOpenGLESKHR.java deleted file mode 100644 index e819b2e1..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSwapchainImageOpenGLESKHR.java +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSwapchainImageOpenGLESKHR {
- *     XrStructureType type;
- *     void * next;
- *     uint32_t image;
- * }
- */ -public class XrSwapchainImageOpenGLESKHR extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - IMAGE; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - IMAGE = layout.offsetof(2); - } - - /** - * Creates a {@code XrSwapchainImageOpenGLESKHR} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSwapchainImageOpenGLESKHR(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return the value of the {@code image} field. */ - @NativeType("uint32_t") - public int image() { return nimage(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrSwapchainImageOpenGLESKHR type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link KHROpenglEsEnable#XR_TYPE_SWAPCHAIN_IMAGE_OPENGL_ES_KHR TYPE_SWAPCHAIN_IMAGE_OPENGL_ES_KHR} value to the {@code type} field. */ - public XrSwapchainImageOpenGLESKHR type$Default() { return type(KHROpenglEsEnable.XR_TYPE_SWAPCHAIN_IMAGE_OPENGL_ES_KHR); } - /** Sets the specified value to the {@code next} field. */ - public XrSwapchainImageOpenGLESKHR next(@NativeType("void *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code image} field. */ - public XrSwapchainImageOpenGLESKHR image(@NativeType("uint32_t") int value) { nimage(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrSwapchainImageOpenGLESKHR set( - int type, - long next, - int image - ) { - type(type); - next(next); - image(image); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSwapchainImageOpenGLESKHR set(XrSwapchainImageOpenGLESKHR src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSwapchainImageOpenGLESKHR} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSwapchainImageOpenGLESKHR malloc() { - return wrap(XrSwapchainImageOpenGLESKHR.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSwapchainImageOpenGLESKHR} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSwapchainImageOpenGLESKHR calloc() { - return wrap(XrSwapchainImageOpenGLESKHR.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSwapchainImageOpenGLESKHR} instance allocated with {@link BufferUtils}. */ - public static XrSwapchainImageOpenGLESKHR create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSwapchainImageOpenGLESKHR.class, memAddress(container), container); - } - - /** Returns a new {@code XrSwapchainImageOpenGLESKHR} instance for the specified memory address. */ - public static XrSwapchainImageOpenGLESKHR create(long address) { - return wrap(XrSwapchainImageOpenGLESKHR.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSwapchainImageOpenGLESKHR createSafe(long address) { - return address == NULL ? null : wrap(XrSwapchainImageOpenGLESKHR.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSwapchainImageOpenGLESKHR.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSwapchainImageOpenGLESKHR} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSwapchainImageOpenGLESKHR malloc(MemoryStack stack) { - return wrap(XrSwapchainImageOpenGLESKHR.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSwapchainImageOpenGLESKHR} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSwapchainImageOpenGLESKHR calloc(MemoryStack stack) { - return wrap(XrSwapchainImageOpenGLESKHR.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSwapchainImageOpenGLESKHR.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSwapchainImageOpenGLESKHR.NEXT); } - /** Unsafe version of {@link #image}. */ - public static int nimage(long struct) { return UNSAFE.getInt(null, struct + XrSwapchainImageOpenGLESKHR.IMAGE); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSwapchainImageOpenGLESKHR.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSwapchainImageOpenGLESKHR.NEXT, value); } - /** Unsafe version of {@link #image(int) image}. */ - public static void nimage(long struct, int value) { UNSAFE.putInt(null, struct + XrSwapchainImageOpenGLESKHR.IMAGE, value); } - - // ----------------------------------- - - /** An array of {@link XrSwapchainImageOpenGLESKHR} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSwapchainImageOpenGLESKHR ELEMENT_FACTORY = XrSwapchainImageOpenGLESKHR.create(-1L); - - /** - * Creates a new {@code XrSwapchainImageOpenGLESKHR.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSwapchainImageOpenGLESKHR#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSwapchainImageOpenGLESKHR getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSwapchainImageOpenGLESKHR.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrSwapchainImageOpenGLESKHR.nnext(address()); } - /** @return the value of the {@code image} field. */ - @NativeType("uint32_t") - public int image() { return XrSwapchainImageOpenGLESKHR.nimage(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSwapchainImageOpenGLESKHR.ntype(address(), value); return this; } - /** Sets the {@link KHROpenglEsEnable#XR_TYPE_SWAPCHAIN_IMAGE_OPENGL_ES_KHR TYPE_SWAPCHAIN_IMAGE_OPENGL_ES_KHR} value to the {@code type} field. */ - public Buffer type$Default() { return type(KHROpenglEsEnable.XR_TYPE_SWAPCHAIN_IMAGE_OPENGL_ES_KHR); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrSwapchainImageOpenGLESKHR.nnext(address(), value); return this; } - /** Sets the specified value to the {@code image} field. */ - public Buffer image(@NativeType("uint32_t") int value) { XrSwapchainImageOpenGLESKHR.nimage(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSwapchainImageOpenGLKHR.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSwapchainImageOpenGLKHR.java deleted file mode 100644 index 1f2f564e..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSwapchainImageOpenGLKHR.java +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSwapchainImageOpenGLKHR {
- *     XrStructureType type;
- *     void * next;
- *     uint32_t image;
- * }
- */ -public class XrSwapchainImageOpenGLKHR extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - IMAGE; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - IMAGE = layout.offsetof(2); - } - - /** - * Creates a {@code XrSwapchainImageOpenGLKHR} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSwapchainImageOpenGLKHR(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return the value of the {@code image} field. */ - @NativeType("uint32_t") - public int image() { return nimage(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrSwapchainImageOpenGLKHR type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link KHROpenglEnable#XR_TYPE_SWAPCHAIN_IMAGE_OPENGL_KHR TYPE_SWAPCHAIN_IMAGE_OPENGL_KHR} value to the {@code type} field. */ - public XrSwapchainImageOpenGLKHR type$Default() { return type(KHROpenglEnable.XR_TYPE_SWAPCHAIN_IMAGE_OPENGL_KHR); } - /** Sets the specified value to the {@code next} field. */ - public XrSwapchainImageOpenGLKHR next(@NativeType("void *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code image} field. */ - public XrSwapchainImageOpenGLKHR image(@NativeType("uint32_t") int value) { nimage(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrSwapchainImageOpenGLKHR set( - int type, - long next, - int image - ) { - type(type); - next(next); - image(image); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSwapchainImageOpenGLKHR set(XrSwapchainImageOpenGLKHR src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSwapchainImageOpenGLKHR} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSwapchainImageOpenGLKHR malloc() { - return wrap(XrSwapchainImageOpenGLKHR.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSwapchainImageOpenGLKHR} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSwapchainImageOpenGLKHR calloc() { - return wrap(XrSwapchainImageOpenGLKHR.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSwapchainImageOpenGLKHR} instance allocated with {@link BufferUtils}. */ - public static XrSwapchainImageOpenGLKHR create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSwapchainImageOpenGLKHR.class, memAddress(container), container); - } - - /** Returns a new {@code XrSwapchainImageOpenGLKHR} instance for the specified memory address. */ - public static XrSwapchainImageOpenGLKHR create(long address) { - return wrap(XrSwapchainImageOpenGLKHR.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSwapchainImageOpenGLKHR createSafe(long address) { - return address == NULL ? null : wrap(XrSwapchainImageOpenGLKHR.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSwapchainImageOpenGLKHR.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSwapchainImageOpenGLKHR} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSwapchainImageOpenGLKHR malloc(MemoryStack stack) { - return wrap(XrSwapchainImageOpenGLKHR.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSwapchainImageOpenGLKHR} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSwapchainImageOpenGLKHR calloc(MemoryStack stack) { - return wrap(XrSwapchainImageOpenGLKHR.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSwapchainImageOpenGLKHR.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSwapchainImageOpenGLKHR.NEXT); } - /** Unsafe version of {@link #image}. */ - public static int nimage(long struct) { return UNSAFE.getInt(null, struct + XrSwapchainImageOpenGLKHR.IMAGE); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSwapchainImageOpenGLKHR.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSwapchainImageOpenGLKHR.NEXT, value); } - /** Unsafe version of {@link #image(int) image}. */ - public static void nimage(long struct, int value) { UNSAFE.putInt(null, struct + XrSwapchainImageOpenGLKHR.IMAGE, value); } - - // ----------------------------------- - - /** An array of {@link XrSwapchainImageOpenGLKHR} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSwapchainImageOpenGLKHR ELEMENT_FACTORY = XrSwapchainImageOpenGLKHR.create(-1L); - - /** - * Creates a new {@code XrSwapchainImageOpenGLKHR.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSwapchainImageOpenGLKHR#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSwapchainImageOpenGLKHR getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSwapchainImageOpenGLKHR.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrSwapchainImageOpenGLKHR.nnext(address()); } - /** @return the value of the {@code image} field. */ - @NativeType("uint32_t") - public int image() { return XrSwapchainImageOpenGLKHR.nimage(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSwapchainImageOpenGLKHR.ntype(address(), value); return this; } - /** Sets the {@link KHROpenglEnable#XR_TYPE_SWAPCHAIN_IMAGE_OPENGL_KHR TYPE_SWAPCHAIN_IMAGE_OPENGL_KHR} value to the {@code type} field. */ - public Buffer type$Default() { return type(KHROpenglEnable.XR_TYPE_SWAPCHAIN_IMAGE_OPENGL_KHR); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrSwapchainImageOpenGLKHR.nnext(address(), value); return this; } - /** Sets the specified value to the {@code image} field. */ - public Buffer image(@NativeType("uint32_t") int value) { XrSwapchainImageOpenGLKHR.nimage(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSwapchainImageReleaseInfo.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSwapchainImageReleaseInfo.java deleted file mode 100644 index 74bc6407..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSwapchainImageReleaseInfo.java +++ /dev/null @@ -1,279 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSwapchainImageReleaseInfo {
- *     XrStructureType type;
- *     void const * next;
- * }
- */ -public class XrSwapchainImageReleaseInfo extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - } - - /** - * Creates a {@code XrSwapchainImageReleaseInfo} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSwapchainImageReleaseInfo(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrSwapchainImageReleaseInfo type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_SWAPCHAIN_IMAGE_RELEASE_INFO TYPE_SWAPCHAIN_IMAGE_RELEASE_INFO} value to the {@code type} field. */ - public XrSwapchainImageReleaseInfo type$Default() { return type(XR10.XR_TYPE_SWAPCHAIN_IMAGE_RELEASE_INFO); } - /** Sets the specified value to the {@code next} field. */ - public XrSwapchainImageReleaseInfo next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrSwapchainImageReleaseInfo set( - int type, - long next - ) { - type(type); - next(next); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSwapchainImageReleaseInfo set(XrSwapchainImageReleaseInfo src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSwapchainImageReleaseInfo} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSwapchainImageReleaseInfo malloc() { - return wrap(XrSwapchainImageReleaseInfo.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSwapchainImageReleaseInfo} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSwapchainImageReleaseInfo calloc() { - return wrap(XrSwapchainImageReleaseInfo.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSwapchainImageReleaseInfo} instance allocated with {@link BufferUtils}. */ - public static XrSwapchainImageReleaseInfo create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSwapchainImageReleaseInfo.class, memAddress(container), container); - } - - /** Returns a new {@code XrSwapchainImageReleaseInfo} instance for the specified memory address. */ - public static XrSwapchainImageReleaseInfo create(long address) { - return wrap(XrSwapchainImageReleaseInfo.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSwapchainImageReleaseInfo createSafe(long address) { - return address == NULL ? null : wrap(XrSwapchainImageReleaseInfo.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSwapchainImageReleaseInfo.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSwapchainImageReleaseInfo} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSwapchainImageReleaseInfo malloc(MemoryStack stack) { - return wrap(XrSwapchainImageReleaseInfo.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSwapchainImageReleaseInfo} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSwapchainImageReleaseInfo calloc(MemoryStack stack) { - return wrap(XrSwapchainImageReleaseInfo.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSwapchainImageReleaseInfo.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSwapchainImageReleaseInfo.NEXT); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSwapchainImageReleaseInfo.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSwapchainImageReleaseInfo.NEXT, value); } - - // ----------------------------------- - - /** An array of {@link XrSwapchainImageReleaseInfo} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSwapchainImageReleaseInfo ELEMENT_FACTORY = XrSwapchainImageReleaseInfo.create(-1L); - - /** - * Creates a new {@code XrSwapchainImageReleaseInfo.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSwapchainImageReleaseInfo#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSwapchainImageReleaseInfo getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSwapchainImageReleaseInfo.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrSwapchainImageReleaseInfo.nnext(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSwapchainImageReleaseInfo.ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_SWAPCHAIN_IMAGE_RELEASE_INFO TYPE_SWAPCHAIN_IMAGE_RELEASE_INFO} value to the {@code type} field. */ - public Buffer type$Default() { return type(XR10.XR_TYPE_SWAPCHAIN_IMAGE_RELEASE_INFO); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrSwapchainImageReleaseInfo.nnext(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSwapchainImageWaitInfo.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSwapchainImageWaitInfo.java deleted file mode 100644 index e87d9edc..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSwapchainImageWaitInfo.java +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSwapchainImageWaitInfo {
- *     XrStructureType type;
- *     void const * next;
- *     XrDuration timeout;
- * }
- */ -public class XrSwapchainImageWaitInfo extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - TIMEOUT; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(8) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - TIMEOUT = layout.offsetof(2); - } - - /** - * Creates a {@code XrSwapchainImageWaitInfo} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSwapchainImageWaitInfo(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code timeout} field. */ - @NativeType("XrDuration") - public long timeout() { return ntimeout(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrSwapchainImageWaitInfo type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_SWAPCHAIN_IMAGE_WAIT_INFO TYPE_SWAPCHAIN_IMAGE_WAIT_INFO} value to the {@code type} field. */ - public XrSwapchainImageWaitInfo type$Default() { return type(XR10.XR_TYPE_SWAPCHAIN_IMAGE_WAIT_INFO); } - /** Sets the specified value to the {@code next} field. */ - public XrSwapchainImageWaitInfo next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code timeout} field. */ - public XrSwapchainImageWaitInfo timeout(@NativeType("XrDuration") long value) { ntimeout(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrSwapchainImageWaitInfo set( - int type, - long next, - long timeout - ) { - type(type); - next(next); - timeout(timeout); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSwapchainImageWaitInfo set(XrSwapchainImageWaitInfo src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSwapchainImageWaitInfo} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSwapchainImageWaitInfo malloc() { - return wrap(XrSwapchainImageWaitInfo.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSwapchainImageWaitInfo} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSwapchainImageWaitInfo calloc() { - return wrap(XrSwapchainImageWaitInfo.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSwapchainImageWaitInfo} instance allocated with {@link BufferUtils}. */ - public static XrSwapchainImageWaitInfo create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSwapchainImageWaitInfo.class, memAddress(container), container); - } - - /** Returns a new {@code XrSwapchainImageWaitInfo} instance for the specified memory address. */ - public static XrSwapchainImageWaitInfo create(long address) { - return wrap(XrSwapchainImageWaitInfo.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSwapchainImageWaitInfo createSafe(long address) { - return address == NULL ? null : wrap(XrSwapchainImageWaitInfo.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSwapchainImageWaitInfo.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSwapchainImageWaitInfo} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSwapchainImageWaitInfo malloc(MemoryStack stack) { - return wrap(XrSwapchainImageWaitInfo.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSwapchainImageWaitInfo} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSwapchainImageWaitInfo calloc(MemoryStack stack) { - return wrap(XrSwapchainImageWaitInfo.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSwapchainImageWaitInfo.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSwapchainImageWaitInfo.NEXT); } - /** Unsafe version of {@link #timeout}. */ - public static long ntimeout(long struct) { return UNSAFE.getLong(null, struct + XrSwapchainImageWaitInfo.TIMEOUT); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSwapchainImageWaitInfo.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSwapchainImageWaitInfo.NEXT, value); } - /** Unsafe version of {@link #timeout(long) timeout}. */ - public static void ntimeout(long struct, long value) { UNSAFE.putLong(null, struct + XrSwapchainImageWaitInfo.TIMEOUT, value); } - - // ----------------------------------- - - /** An array of {@link XrSwapchainImageWaitInfo} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSwapchainImageWaitInfo ELEMENT_FACTORY = XrSwapchainImageWaitInfo.create(-1L); - - /** - * Creates a new {@code XrSwapchainImageWaitInfo.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSwapchainImageWaitInfo#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSwapchainImageWaitInfo getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSwapchainImageWaitInfo.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrSwapchainImageWaitInfo.nnext(address()); } - /** @return the value of the {@code timeout} field. */ - @NativeType("XrDuration") - public long timeout() { return XrSwapchainImageWaitInfo.ntimeout(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSwapchainImageWaitInfo.ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_SWAPCHAIN_IMAGE_WAIT_INFO TYPE_SWAPCHAIN_IMAGE_WAIT_INFO} value to the {@code type} field. */ - public Buffer type$Default() { return type(XR10.XR_TYPE_SWAPCHAIN_IMAGE_WAIT_INFO); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrSwapchainImageWaitInfo.nnext(address(), value); return this; } - /** Sets the specified value to the {@code timeout} field. */ - public Buffer timeout(@NativeType("XrDuration") long value) { XrSwapchainImageWaitInfo.ntimeout(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSwapchainStateAndroidSurfaceDimensionsFB.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSwapchainStateAndroidSurfaceDimensionsFB.java deleted file mode 100644 index ead6b9aa..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSwapchainStateAndroidSurfaceDimensionsFB.java +++ /dev/null @@ -1,319 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSwapchainStateAndroidSurfaceDimensionsFB {
- *     XrStructureType type;
- *     void * next;
- *     uint32_t width;
- *     uint32_t height;
- * }
- */ -public class XrSwapchainStateAndroidSurfaceDimensionsFB extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - WIDTH, - HEIGHT; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - WIDTH = layout.offsetof(2); - HEIGHT = layout.offsetof(3); - } - - /** - * Creates a {@code XrSwapchainStateAndroidSurfaceDimensionsFB} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSwapchainStateAndroidSurfaceDimensionsFB(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return the value of the {@code width} field. */ - @NativeType("uint32_t") - public int width() { return nwidth(address()); } - /** @return the value of the {@code height} field. */ - @NativeType("uint32_t") - public int height() { return nheight(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrSwapchainStateAndroidSurfaceDimensionsFB type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link FBSwapchainUpdateStateAndroidSurface#XR_TYPE_SWAPCHAIN_STATE_ANDROID_SURFACE_DIMENSIONS_FB TYPE_SWAPCHAIN_STATE_ANDROID_SURFACE_DIMENSIONS_FB} value to the {@code type} field. */ - public XrSwapchainStateAndroidSurfaceDimensionsFB type$Default() { return type(FBSwapchainUpdateStateAndroidSurface.XR_TYPE_SWAPCHAIN_STATE_ANDROID_SURFACE_DIMENSIONS_FB); } - /** Sets the specified value to the {@code next} field. */ - public XrSwapchainStateAndroidSurfaceDimensionsFB next(@NativeType("void *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code width} field. */ - public XrSwapchainStateAndroidSurfaceDimensionsFB width(@NativeType("uint32_t") int value) { nwidth(address(), value); return this; } - /** Sets the specified value to the {@code height} field. */ - public XrSwapchainStateAndroidSurfaceDimensionsFB height(@NativeType("uint32_t") int value) { nheight(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrSwapchainStateAndroidSurfaceDimensionsFB set( - int type, - long next, - int width, - int height - ) { - type(type); - next(next); - width(width); - height(height); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSwapchainStateAndroidSurfaceDimensionsFB set(XrSwapchainStateAndroidSurfaceDimensionsFB src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSwapchainStateAndroidSurfaceDimensionsFB} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSwapchainStateAndroidSurfaceDimensionsFB malloc() { - return wrap(XrSwapchainStateAndroidSurfaceDimensionsFB.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSwapchainStateAndroidSurfaceDimensionsFB} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSwapchainStateAndroidSurfaceDimensionsFB calloc() { - return wrap(XrSwapchainStateAndroidSurfaceDimensionsFB.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSwapchainStateAndroidSurfaceDimensionsFB} instance allocated with {@link BufferUtils}. */ - public static XrSwapchainStateAndroidSurfaceDimensionsFB create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSwapchainStateAndroidSurfaceDimensionsFB.class, memAddress(container), container); - } - - /** Returns a new {@code XrSwapchainStateAndroidSurfaceDimensionsFB} instance for the specified memory address. */ - public static XrSwapchainStateAndroidSurfaceDimensionsFB create(long address) { - return wrap(XrSwapchainStateAndroidSurfaceDimensionsFB.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSwapchainStateAndroidSurfaceDimensionsFB createSafe(long address) { - return address == NULL ? null : wrap(XrSwapchainStateAndroidSurfaceDimensionsFB.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSwapchainStateAndroidSurfaceDimensionsFB.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSwapchainStateAndroidSurfaceDimensionsFB} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSwapchainStateAndroidSurfaceDimensionsFB malloc(MemoryStack stack) { - return wrap(XrSwapchainStateAndroidSurfaceDimensionsFB.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSwapchainStateAndroidSurfaceDimensionsFB} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSwapchainStateAndroidSurfaceDimensionsFB calloc(MemoryStack stack) { - return wrap(XrSwapchainStateAndroidSurfaceDimensionsFB.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSwapchainStateAndroidSurfaceDimensionsFB.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSwapchainStateAndroidSurfaceDimensionsFB.NEXT); } - /** Unsafe version of {@link #width}. */ - public static int nwidth(long struct) { return UNSAFE.getInt(null, struct + XrSwapchainStateAndroidSurfaceDimensionsFB.WIDTH); } - /** Unsafe version of {@link #height}. */ - public static int nheight(long struct) { return UNSAFE.getInt(null, struct + XrSwapchainStateAndroidSurfaceDimensionsFB.HEIGHT); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSwapchainStateAndroidSurfaceDimensionsFB.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSwapchainStateAndroidSurfaceDimensionsFB.NEXT, value); } - /** Unsafe version of {@link #width(int) width}. */ - public static void nwidth(long struct, int value) { UNSAFE.putInt(null, struct + XrSwapchainStateAndroidSurfaceDimensionsFB.WIDTH, value); } - /** Unsafe version of {@link #height(int) height}. */ - public static void nheight(long struct, int value) { UNSAFE.putInt(null, struct + XrSwapchainStateAndroidSurfaceDimensionsFB.HEIGHT, value); } - - // ----------------------------------- - - /** An array of {@link XrSwapchainStateAndroidSurfaceDimensionsFB} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSwapchainStateAndroidSurfaceDimensionsFB ELEMENT_FACTORY = XrSwapchainStateAndroidSurfaceDimensionsFB.create(-1L); - - /** - * Creates a new {@code XrSwapchainStateAndroidSurfaceDimensionsFB.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSwapchainStateAndroidSurfaceDimensionsFB#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSwapchainStateAndroidSurfaceDimensionsFB getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSwapchainStateAndroidSurfaceDimensionsFB.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrSwapchainStateAndroidSurfaceDimensionsFB.nnext(address()); } - /** @return the value of the {@code width} field. */ - @NativeType("uint32_t") - public int width() { return XrSwapchainStateAndroidSurfaceDimensionsFB.nwidth(address()); } - /** @return the value of the {@code height} field. */ - @NativeType("uint32_t") - public int height() { return XrSwapchainStateAndroidSurfaceDimensionsFB.nheight(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSwapchainStateAndroidSurfaceDimensionsFB.ntype(address(), value); return this; } - /** Sets the {@link FBSwapchainUpdateStateAndroidSurface#XR_TYPE_SWAPCHAIN_STATE_ANDROID_SURFACE_DIMENSIONS_FB TYPE_SWAPCHAIN_STATE_ANDROID_SURFACE_DIMENSIONS_FB} value to the {@code type} field. */ - public Buffer type$Default() { return type(FBSwapchainUpdateStateAndroidSurface.XR_TYPE_SWAPCHAIN_STATE_ANDROID_SURFACE_DIMENSIONS_FB); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrSwapchainStateAndroidSurfaceDimensionsFB.nnext(address(), value); return this; } - /** Sets the specified value to the {@code width} field. */ - public Buffer width(@NativeType("uint32_t") int value) { XrSwapchainStateAndroidSurfaceDimensionsFB.nwidth(address(), value); return this; } - /** Sets the specified value to the {@code height} field. */ - public Buffer height(@NativeType("uint32_t") int value) { XrSwapchainStateAndroidSurfaceDimensionsFB.nheight(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSwapchainStateBaseHeaderFB.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSwapchainStateBaseHeaderFB.java deleted file mode 100644 index 963871a9..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSwapchainStateBaseHeaderFB.java +++ /dev/null @@ -1,275 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSwapchainStateBaseHeaderFB {
- *     XrStructureType type;
- *     void * next;
- * }
- */ -public class XrSwapchainStateBaseHeaderFB extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - } - - /** - * Creates a {@code XrSwapchainStateBaseHeaderFB} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSwapchainStateBaseHeaderFB(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrSwapchainStateBaseHeaderFB type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the specified value to the {@code next} field. */ - public XrSwapchainStateBaseHeaderFB next(@NativeType("void *") long value) { nnext(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrSwapchainStateBaseHeaderFB set( - int type, - long next - ) { - type(type); - next(next); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSwapchainStateBaseHeaderFB set(XrSwapchainStateBaseHeaderFB src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSwapchainStateBaseHeaderFB} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSwapchainStateBaseHeaderFB malloc() { - return wrap(XrSwapchainStateBaseHeaderFB.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSwapchainStateBaseHeaderFB} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSwapchainStateBaseHeaderFB calloc() { - return wrap(XrSwapchainStateBaseHeaderFB.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSwapchainStateBaseHeaderFB} instance allocated with {@link BufferUtils}. */ - public static XrSwapchainStateBaseHeaderFB create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSwapchainStateBaseHeaderFB.class, memAddress(container), container); - } - - /** Returns a new {@code XrSwapchainStateBaseHeaderFB} instance for the specified memory address. */ - public static XrSwapchainStateBaseHeaderFB create(long address) { - return wrap(XrSwapchainStateBaseHeaderFB.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSwapchainStateBaseHeaderFB createSafe(long address) { - return address == NULL ? null : wrap(XrSwapchainStateBaseHeaderFB.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSwapchainStateBaseHeaderFB.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSwapchainStateBaseHeaderFB} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSwapchainStateBaseHeaderFB malloc(MemoryStack stack) { - return wrap(XrSwapchainStateBaseHeaderFB.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSwapchainStateBaseHeaderFB} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSwapchainStateBaseHeaderFB calloc(MemoryStack stack) { - return wrap(XrSwapchainStateBaseHeaderFB.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSwapchainStateBaseHeaderFB.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSwapchainStateBaseHeaderFB.NEXT); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSwapchainStateBaseHeaderFB.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSwapchainStateBaseHeaderFB.NEXT, value); } - - // ----------------------------------- - - /** An array of {@link XrSwapchainStateBaseHeaderFB} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSwapchainStateBaseHeaderFB ELEMENT_FACTORY = XrSwapchainStateBaseHeaderFB.create(-1L); - - /** - * Creates a new {@code XrSwapchainStateBaseHeaderFB.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSwapchainStateBaseHeaderFB#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSwapchainStateBaseHeaderFB getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSwapchainStateBaseHeaderFB.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrSwapchainStateBaseHeaderFB.nnext(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSwapchainStateBaseHeaderFB.ntype(address(), value); return this; } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrSwapchainStateBaseHeaderFB.nnext(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSwapchainStateFoveationFB.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSwapchainStateFoveationFB.java deleted file mode 100644 index 2ed9fa0f..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSwapchainStateFoveationFB.java +++ /dev/null @@ -1,341 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSwapchainStateFoveationFB {
- *     XrStructureType type;
- *     void * next;
- *     XrSwapchainStateFoveationFlagsFB flags;
- *     XrFoveationProfileFB profile;
- * }
- */ -public class XrSwapchainStateFoveationFB extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - FLAGS, - PROFILE; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(8), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - FLAGS = layout.offsetof(2); - PROFILE = layout.offsetof(3); - } - - /** - * Creates a {@code XrSwapchainStateFoveationFB} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSwapchainStateFoveationFB(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return the value of the {@code flags} field. */ - @NativeType("XrSwapchainStateFoveationFlagsFB") - public long flags() { return nflags(address()); } - /** @return the value of the {@code profile} field. */ - @NativeType("XrFoveationProfileFB") - public long profile() { return nprofile(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrSwapchainStateFoveationFB type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link FBFoveation#XR_TYPE_SWAPCHAIN_STATE_FOVEATION_FB TYPE_SWAPCHAIN_STATE_FOVEATION_FB} value to the {@code type} field. */ - public XrSwapchainStateFoveationFB type$Default() { return type(FBFoveation.XR_TYPE_SWAPCHAIN_STATE_FOVEATION_FB); } - /** Sets the specified value to the {@code next} field. */ - public XrSwapchainStateFoveationFB next(@NativeType("void *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code flags} field. */ - public XrSwapchainStateFoveationFB flags(@NativeType("XrSwapchainStateFoveationFlagsFB") long value) { nflags(address(), value); return this; } - /** Sets the specified value to the {@code profile} field. */ - public XrSwapchainStateFoveationFB profile(XrFoveationProfileFB value) { nprofile(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrSwapchainStateFoveationFB set( - int type, - long next, - long flags, - XrFoveationProfileFB profile - ) { - type(type); - next(next); - flags(flags); - profile(profile); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSwapchainStateFoveationFB set(XrSwapchainStateFoveationFB src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSwapchainStateFoveationFB} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSwapchainStateFoveationFB malloc() { - return wrap(XrSwapchainStateFoveationFB.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSwapchainStateFoveationFB} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSwapchainStateFoveationFB calloc() { - return wrap(XrSwapchainStateFoveationFB.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSwapchainStateFoveationFB} instance allocated with {@link BufferUtils}. */ - public static XrSwapchainStateFoveationFB create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSwapchainStateFoveationFB.class, memAddress(container), container); - } - - /** Returns a new {@code XrSwapchainStateFoveationFB} instance for the specified memory address. */ - public static XrSwapchainStateFoveationFB create(long address) { - return wrap(XrSwapchainStateFoveationFB.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSwapchainStateFoveationFB createSafe(long address) { - return address == NULL ? null : wrap(XrSwapchainStateFoveationFB.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSwapchainStateFoveationFB.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSwapchainStateFoveationFB} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSwapchainStateFoveationFB malloc(MemoryStack stack) { - return wrap(XrSwapchainStateFoveationFB.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSwapchainStateFoveationFB} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSwapchainStateFoveationFB calloc(MemoryStack stack) { - return wrap(XrSwapchainStateFoveationFB.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSwapchainStateFoveationFB.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSwapchainStateFoveationFB.NEXT); } - /** Unsafe version of {@link #flags}. */ - public static long nflags(long struct) { return UNSAFE.getLong(null, struct + XrSwapchainStateFoveationFB.FLAGS); } - /** Unsafe version of {@link #profile}. */ - public static long nprofile(long struct) { return memGetAddress(struct + XrSwapchainStateFoveationFB.PROFILE); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSwapchainStateFoveationFB.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSwapchainStateFoveationFB.NEXT, value); } - /** Unsafe version of {@link #flags(long) flags}. */ - public static void nflags(long struct, long value) { UNSAFE.putLong(null, struct + XrSwapchainStateFoveationFB.FLAGS, value); } - /** Unsafe version of {@link #profile(XrFoveationProfileFB) profile}. */ - public static void nprofile(long struct, XrFoveationProfileFB value) { memPutAddress(struct + XrSwapchainStateFoveationFB.PROFILE, value.address()); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XrSwapchainStateFoveationFB.PROFILE)); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrSwapchainStateFoveationFB} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSwapchainStateFoveationFB ELEMENT_FACTORY = XrSwapchainStateFoveationFB.create(-1L); - - /** - * Creates a new {@code XrSwapchainStateFoveationFB.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSwapchainStateFoveationFB#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSwapchainStateFoveationFB getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSwapchainStateFoveationFB.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrSwapchainStateFoveationFB.nnext(address()); } - /** @return the value of the {@code flags} field. */ - @NativeType("XrSwapchainStateFoveationFlagsFB") - public long flags() { return XrSwapchainStateFoveationFB.nflags(address()); } - /** @return the value of the {@code profile} field. */ - @NativeType("XrFoveationProfileFB") - public long profile() { return XrSwapchainStateFoveationFB.nprofile(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSwapchainStateFoveationFB.ntype(address(), value); return this; } - /** Sets the {@link FBFoveation#XR_TYPE_SWAPCHAIN_STATE_FOVEATION_FB TYPE_SWAPCHAIN_STATE_FOVEATION_FB} value to the {@code type} field. */ - public Buffer type$Default() { return type(FBFoveation.XR_TYPE_SWAPCHAIN_STATE_FOVEATION_FB); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrSwapchainStateFoveationFB.nnext(address(), value); return this; } - /** Sets the specified value to the {@code flags} field. */ - public Buffer flags(@NativeType("XrSwapchainStateFoveationFlagsFB") long value) { XrSwapchainStateFoveationFB.nflags(address(), value); return this; } - /** Sets the specified value to the {@code profile} field. */ - public Buffer profile(XrFoveationProfileFB value) { XrSwapchainStateFoveationFB.nprofile(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSwapchainStateSamplerOpenGLESFB.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSwapchainStateSamplerOpenGLESFB.java deleted file mode 100644 index 4a3d6320..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSwapchainStateSamplerOpenGLESFB.java +++ /dev/null @@ -1,479 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSwapchainStateSamplerOpenGLESFB {
- *     XrStructureType type;
- *     void * next;
- *     EGLenum minFilter;
- *     EGLenum magFilter;
- *     EGLenum wrapModeS;
- *     EGLenum wrapModeT;
- *     EGLenum swizzleRed;
- *     EGLenum swizzleGreen;
- *     EGLenum swizzleBlue;
- *     EGLenum swizzleAlpha;
- *     float maxAnisotropy;
- *     {@link XrColor4f XrColor4f} borderColor;
- * }
- */ -public class XrSwapchainStateSamplerOpenGLESFB extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - MINFILTER, - MAGFILTER, - WRAPMODES, - WRAPMODET, - SWIZZLERED, - SWIZZLEGREEN, - SWIZZLEBLUE, - SWIZZLEALPHA, - MAXANISOTROPY, - BORDERCOLOR; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(XrColor4f.SIZEOF, XrColor4f.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - MINFILTER = layout.offsetof(2); - MAGFILTER = layout.offsetof(3); - WRAPMODES = layout.offsetof(4); - WRAPMODET = layout.offsetof(5); - SWIZZLERED = layout.offsetof(6); - SWIZZLEGREEN = layout.offsetof(7); - SWIZZLEBLUE = layout.offsetof(8); - SWIZZLEALPHA = layout.offsetof(9); - MAXANISOTROPY = layout.offsetof(10); - BORDERCOLOR = layout.offsetof(11); - } - - /** - * Creates a {@code XrSwapchainStateSamplerOpenGLESFB} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSwapchainStateSamplerOpenGLESFB(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return the value of the {@code minFilter} field. */ - @NativeType("EGLenum") - public int minFilter() { return nminFilter(address()); } - /** @return the value of the {@code magFilter} field. */ - @NativeType("EGLenum") - public int magFilter() { return nmagFilter(address()); } - /** @return the value of the {@code wrapModeS} field. */ - @NativeType("EGLenum") - public int wrapModeS() { return nwrapModeS(address()); } - /** @return the value of the {@code wrapModeT} field. */ - @NativeType("EGLenum") - public int wrapModeT() { return nwrapModeT(address()); } - /** @return the value of the {@code swizzleRed} field. */ - @NativeType("EGLenum") - public int swizzleRed() { return nswizzleRed(address()); } - /** @return the value of the {@code swizzleGreen} field. */ - @NativeType("EGLenum") - public int swizzleGreen() { return nswizzleGreen(address()); } - /** @return the value of the {@code swizzleBlue} field. */ - @NativeType("EGLenum") - public int swizzleBlue() { return nswizzleBlue(address()); } - /** @return the value of the {@code swizzleAlpha} field. */ - @NativeType("EGLenum") - public int swizzleAlpha() { return nswizzleAlpha(address()); } - /** @return the value of the {@code maxAnisotropy} field. */ - public float maxAnisotropy() { return nmaxAnisotropy(address()); } - /** @return a {@link XrColor4f} view of the {@code borderColor} field. */ - public XrColor4f borderColor() { return nborderColor(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrSwapchainStateSamplerOpenGLESFB type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link FBSwapchainUpdateStateOpenglEs#XR_TYPE_SWAPCHAIN_STATE_SAMPLER_OPENGL_ES_FB TYPE_SWAPCHAIN_STATE_SAMPLER_OPENGL_ES_FB} value to the {@code type} field. */ - public XrSwapchainStateSamplerOpenGLESFB type$Default() { return type(FBSwapchainUpdateStateOpenglEs.XR_TYPE_SWAPCHAIN_STATE_SAMPLER_OPENGL_ES_FB); } - /** Sets the specified value to the {@code next} field. */ - public XrSwapchainStateSamplerOpenGLESFB next(@NativeType("void *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code minFilter} field. */ - public XrSwapchainStateSamplerOpenGLESFB minFilter(@NativeType("EGLenum") int value) { nminFilter(address(), value); return this; } - /** Sets the specified value to the {@code magFilter} field. */ - public XrSwapchainStateSamplerOpenGLESFB magFilter(@NativeType("EGLenum") int value) { nmagFilter(address(), value); return this; } - /** Sets the specified value to the {@code wrapModeS} field. */ - public XrSwapchainStateSamplerOpenGLESFB wrapModeS(@NativeType("EGLenum") int value) { nwrapModeS(address(), value); return this; } - /** Sets the specified value to the {@code wrapModeT} field. */ - public XrSwapchainStateSamplerOpenGLESFB wrapModeT(@NativeType("EGLenum") int value) { nwrapModeT(address(), value); return this; } - /** Sets the specified value to the {@code swizzleRed} field. */ - public XrSwapchainStateSamplerOpenGLESFB swizzleRed(@NativeType("EGLenum") int value) { nswizzleRed(address(), value); return this; } - /** Sets the specified value to the {@code swizzleGreen} field. */ - public XrSwapchainStateSamplerOpenGLESFB swizzleGreen(@NativeType("EGLenum") int value) { nswizzleGreen(address(), value); return this; } - /** Sets the specified value to the {@code swizzleBlue} field. */ - public XrSwapchainStateSamplerOpenGLESFB swizzleBlue(@NativeType("EGLenum") int value) { nswizzleBlue(address(), value); return this; } - /** Sets the specified value to the {@code swizzleAlpha} field. */ - public XrSwapchainStateSamplerOpenGLESFB swizzleAlpha(@NativeType("EGLenum") int value) { nswizzleAlpha(address(), value); return this; } - /** Sets the specified value to the {@code maxAnisotropy} field. */ - public XrSwapchainStateSamplerOpenGLESFB maxAnisotropy(float value) { nmaxAnisotropy(address(), value); return this; } - /** Copies the specified {@link XrColor4f} to the {@code borderColor} field. */ - public XrSwapchainStateSamplerOpenGLESFB borderColor(XrColor4f value) { nborderColor(address(), value); return this; } - /** Passes the {@code borderColor} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrSwapchainStateSamplerOpenGLESFB borderColor(java.util.function.Consumer consumer) { consumer.accept(borderColor()); return this; } - - /** Initializes this struct with the specified values. */ - public XrSwapchainStateSamplerOpenGLESFB set( - int type, - long next, - int minFilter, - int magFilter, - int wrapModeS, - int wrapModeT, - int swizzleRed, - int swizzleGreen, - int swizzleBlue, - int swizzleAlpha, - float maxAnisotropy, - XrColor4f borderColor - ) { - type(type); - next(next); - minFilter(minFilter); - magFilter(magFilter); - wrapModeS(wrapModeS); - wrapModeT(wrapModeT); - swizzleRed(swizzleRed); - swizzleGreen(swizzleGreen); - swizzleBlue(swizzleBlue); - swizzleAlpha(swizzleAlpha); - maxAnisotropy(maxAnisotropy); - borderColor(borderColor); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSwapchainStateSamplerOpenGLESFB set(XrSwapchainStateSamplerOpenGLESFB src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSwapchainStateSamplerOpenGLESFB} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSwapchainStateSamplerOpenGLESFB malloc() { - return wrap(XrSwapchainStateSamplerOpenGLESFB.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSwapchainStateSamplerOpenGLESFB} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSwapchainStateSamplerOpenGLESFB calloc() { - return wrap(XrSwapchainStateSamplerOpenGLESFB.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSwapchainStateSamplerOpenGLESFB} instance allocated with {@link BufferUtils}. */ - public static XrSwapchainStateSamplerOpenGLESFB create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSwapchainStateSamplerOpenGLESFB.class, memAddress(container), container); - } - - /** Returns a new {@code XrSwapchainStateSamplerOpenGLESFB} instance for the specified memory address. */ - public static XrSwapchainStateSamplerOpenGLESFB create(long address) { - return wrap(XrSwapchainStateSamplerOpenGLESFB.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSwapchainStateSamplerOpenGLESFB createSafe(long address) { - return address == NULL ? null : wrap(XrSwapchainStateSamplerOpenGLESFB.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSwapchainStateSamplerOpenGLESFB.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSwapchainStateSamplerOpenGLESFB} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSwapchainStateSamplerOpenGLESFB malloc(MemoryStack stack) { - return wrap(XrSwapchainStateSamplerOpenGLESFB.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSwapchainStateSamplerOpenGLESFB} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSwapchainStateSamplerOpenGLESFB calloc(MemoryStack stack) { - return wrap(XrSwapchainStateSamplerOpenGLESFB.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSwapchainStateSamplerOpenGLESFB.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSwapchainStateSamplerOpenGLESFB.NEXT); } - /** Unsafe version of {@link #minFilter}. */ - public static int nminFilter(long struct) { return UNSAFE.getInt(null, struct + XrSwapchainStateSamplerOpenGLESFB.MINFILTER); } - /** Unsafe version of {@link #magFilter}. */ - public static int nmagFilter(long struct) { return UNSAFE.getInt(null, struct + XrSwapchainStateSamplerOpenGLESFB.MAGFILTER); } - /** Unsafe version of {@link #wrapModeS}. */ - public static int nwrapModeS(long struct) { return UNSAFE.getInt(null, struct + XrSwapchainStateSamplerOpenGLESFB.WRAPMODES); } - /** Unsafe version of {@link #wrapModeT}. */ - public static int nwrapModeT(long struct) { return UNSAFE.getInt(null, struct + XrSwapchainStateSamplerOpenGLESFB.WRAPMODET); } - /** Unsafe version of {@link #swizzleRed}. */ - public static int nswizzleRed(long struct) { return UNSAFE.getInt(null, struct + XrSwapchainStateSamplerOpenGLESFB.SWIZZLERED); } - /** Unsafe version of {@link #swizzleGreen}. */ - public static int nswizzleGreen(long struct) { return UNSAFE.getInt(null, struct + XrSwapchainStateSamplerOpenGLESFB.SWIZZLEGREEN); } - /** Unsafe version of {@link #swizzleBlue}. */ - public static int nswizzleBlue(long struct) { return UNSAFE.getInt(null, struct + XrSwapchainStateSamplerOpenGLESFB.SWIZZLEBLUE); } - /** Unsafe version of {@link #swizzleAlpha}. */ - public static int nswizzleAlpha(long struct) { return UNSAFE.getInt(null, struct + XrSwapchainStateSamplerOpenGLESFB.SWIZZLEALPHA); } - /** Unsafe version of {@link #maxAnisotropy}. */ - public static float nmaxAnisotropy(long struct) { return UNSAFE.getFloat(null, struct + XrSwapchainStateSamplerOpenGLESFB.MAXANISOTROPY); } - /** Unsafe version of {@link #borderColor}. */ - public static XrColor4f nborderColor(long struct) { return XrColor4f.create(struct + XrSwapchainStateSamplerOpenGLESFB.BORDERCOLOR); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSwapchainStateSamplerOpenGLESFB.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSwapchainStateSamplerOpenGLESFB.NEXT, value); } - /** Unsafe version of {@link #minFilter(int) minFilter}. */ - public static void nminFilter(long struct, int value) { UNSAFE.putInt(null, struct + XrSwapchainStateSamplerOpenGLESFB.MINFILTER, value); } - /** Unsafe version of {@link #magFilter(int) magFilter}. */ - public static void nmagFilter(long struct, int value) { UNSAFE.putInt(null, struct + XrSwapchainStateSamplerOpenGLESFB.MAGFILTER, value); } - /** Unsafe version of {@link #wrapModeS(int) wrapModeS}. */ - public static void nwrapModeS(long struct, int value) { UNSAFE.putInt(null, struct + XrSwapchainStateSamplerOpenGLESFB.WRAPMODES, value); } - /** Unsafe version of {@link #wrapModeT(int) wrapModeT}. */ - public static void nwrapModeT(long struct, int value) { UNSAFE.putInt(null, struct + XrSwapchainStateSamplerOpenGLESFB.WRAPMODET, value); } - /** Unsafe version of {@link #swizzleRed(int) swizzleRed}. */ - public static void nswizzleRed(long struct, int value) { UNSAFE.putInt(null, struct + XrSwapchainStateSamplerOpenGLESFB.SWIZZLERED, value); } - /** Unsafe version of {@link #swizzleGreen(int) swizzleGreen}. */ - public static void nswizzleGreen(long struct, int value) { UNSAFE.putInt(null, struct + XrSwapchainStateSamplerOpenGLESFB.SWIZZLEGREEN, value); } - /** Unsafe version of {@link #swizzleBlue(int) swizzleBlue}. */ - public static void nswizzleBlue(long struct, int value) { UNSAFE.putInt(null, struct + XrSwapchainStateSamplerOpenGLESFB.SWIZZLEBLUE, value); } - /** Unsafe version of {@link #swizzleAlpha(int) swizzleAlpha}. */ - public static void nswizzleAlpha(long struct, int value) { UNSAFE.putInt(null, struct + XrSwapchainStateSamplerOpenGLESFB.SWIZZLEALPHA, value); } - /** Unsafe version of {@link #maxAnisotropy(float) maxAnisotropy}. */ - public static void nmaxAnisotropy(long struct, float value) { UNSAFE.putFloat(null, struct + XrSwapchainStateSamplerOpenGLESFB.MAXANISOTROPY, value); } - /** Unsafe version of {@link #borderColor(XrColor4f) borderColor}. */ - public static void nborderColor(long struct, XrColor4f value) { memCopy(value.address(), struct + XrSwapchainStateSamplerOpenGLESFB.BORDERCOLOR, XrColor4f.SIZEOF); } - - // ----------------------------------- - - /** An array of {@link XrSwapchainStateSamplerOpenGLESFB} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSwapchainStateSamplerOpenGLESFB ELEMENT_FACTORY = XrSwapchainStateSamplerOpenGLESFB.create(-1L); - - /** - * Creates a new {@code XrSwapchainStateSamplerOpenGLESFB.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSwapchainStateSamplerOpenGLESFB#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSwapchainStateSamplerOpenGLESFB getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSwapchainStateSamplerOpenGLESFB.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrSwapchainStateSamplerOpenGLESFB.nnext(address()); } - /** @return the value of the {@code minFilter} field. */ - @NativeType("EGLenum") - public int minFilter() { return XrSwapchainStateSamplerOpenGLESFB.nminFilter(address()); } - /** @return the value of the {@code magFilter} field. */ - @NativeType("EGLenum") - public int magFilter() { return XrSwapchainStateSamplerOpenGLESFB.nmagFilter(address()); } - /** @return the value of the {@code wrapModeS} field. */ - @NativeType("EGLenum") - public int wrapModeS() { return XrSwapchainStateSamplerOpenGLESFB.nwrapModeS(address()); } - /** @return the value of the {@code wrapModeT} field. */ - @NativeType("EGLenum") - public int wrapModeT() { return XrSwapchainStateSamplerOpenGLESFB.nwrapModeT(address()); } - /** @return the value of the {@code swizzleRed} field. */ - @NativeType("EGLenum") - public int swizzleRed() { return XrSwapchainStateSamplerOpenGLESFB.nswizzleRed(address()); } - /** @return the value of the {@code swizzleGreen} field. */ - @NativeType("EGLenum") - public int swizzleGreen() { return XrSwapchainStateSamplerOpenGLESFB.nswizzleGreen(address()); } - /** @return the value of the {@code swizzleBlue} field. */ - @NativeType("EGLenum") - public int swizzleBlue() { return XrSwapchainStateSamplerOpenGLESFB.nswizzleBlue(address()); } - /** @return the value of the {@code swizzleAlpha} field. */ - @NativeType("EGLenum") - public int swizzleAlpha() { return XrSwapchainStateSamplerOpenGLESFB.nswizzleAlpha(address()); } - /** @return the value of the {@code maxAnisotropy} field. */ - public float maxAnisotropy() { return XrSwapchainStateSamplerOpenGLESFB.nmaxAnisotropy(address()); } - /** @return a {@link XrColor4f} view of the {@code borderColor} field. */ - public XrColor4f borderColor() { return XrSwapchainStateSamplerOpenGLESFB.nborderColor(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSwapchainStateSamplerOpenGLESFB.ntype(address(), value); return this; } - /** Sets the {@link FBSwapchainUpdateStateOpenglEs#XR_TYPE_SWAPCHAIN_STATE_SAMPLER_OPENGL_ES_FB TYPE_SWAPCHAIN_STATE_SAMPLER_OPENGL_ES_FB} value to the {@code type} field. */ - public Buffer type$Default() { return type(FBSwapchainUpdateStateOpenglEs.XR_TYPE_SWAPCHAIN_STATE_SAMPLER_OPENGL_ES_FB); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrSwapchainStateSamplerOpenGLESFB.nnext(address(), value); return this; } - /** Sets the specified value to the {@code minFilter} field. */ - public Buffer minFilter(@NativeType("EGLenum") int value) { XrSwapchainStateSamplerOpenGLESFB.nminFilter(address(), value); return this; } - /** Sets the specified value to the {@code magFilter} field. */ - public Buffer magFilter(@NativeType("EGLenum") int value) { XrSwapchainStateSamplerOpenGLESFB.nmagFilter(address(), value); return this; } - /** Sets the specified value to the {@code wrapModeS} field. */ - public Buffer wrapModeS(@NativeType("EGLenum") int value) { XrSwapchainStateSamplerOpenGLESFB.nwrapModeS(address(), value); return this; } - /** Sets the specified value to the {@code wrapModeT} field. */ - public Buffer wrapModeT(@NativeType("EGLenum") int value) { XrSwapchainStateSamplerOpenGLESFB.nwrapModeT(address(), value); return this; } - /** Sets the specified value to the {@code swizzleRed} field. */ - public Buffer swizzleRed(@NativeType("EGLenum") int value) { XrSwapchainStateSamplerOpenGLESFB.nswizzleRed(address(), value); return this; } - /** Sets the specified value to the {@code swizzleGreen} field. */ - public Buffer swizzleGreen(@NativeType("EGLenum") int value) { XrSwapchainStateSamplerOpenGLESFB.nswizzleGreen(address(), value); return this; } - /** Sets the specified value to the {@code swizzleBlue} field. */ - public Buffer swizzleBlue(@NativeType("EGLenum") int value) { XrSwapchainStateSamplerOpenGLESFB.nswizzleBlue(address(), value); return this; } - /** Sets the specified value to the {@code swizzleAlpha} field. */ - public Buffer swizzleAlpha(@NativeType("EGLenum") int value) { XrSwapchainStateSamplerOpenGLESFB.nswizzleAlpha(address(), value); return this; } - /** Sets the specified value to the {@code maxAnisotropy} field. */ - public Buffer maxAnisotropy(float value) { XrSwapchainStateSamplerOpenGLESFB.nmaxAnisotropy(address(), value); return this; } - /** Copies the specified {@link XrColor4f} to the {@code borderColor} field. */ - public Buffer borderColor(XrColor4f value) { XrSwapchainStateSamplerOpenGLESFB.nborderColor(address(), value); return this; } - /** Passes the {@code borderColor} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer borderColor(java.util.function.Consumer consumer) { consumer.accept(borderColor()); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSwapchainSubImage.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSwapchainSubImage.java deleted file mode 100644 index a9e370b3..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSwapchainSubImage.java +++ /dev/null @@ -1,319 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSwapchainSubImage {
- *     XrSwapchain swapchain;
- *     {@link XrRect2Di XrRect2Di} imageRect;
- *     uint32_t imageArrayIndex;
- * }
- */ -public class XrSwapchainSubImage extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - SWAPCHAIN, - IMAGERECT, - IMAGEARRAYINDEX; - - static { - Layout layout = __struct( - __member(POINTER_SIZE), - __member(XrRect2Di.SIZEOF, XrRect2Di.ALIGNOF), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - SWAPCHAIN = layout.offsetof(0); - IMAGERECT = layout.offsetof(1); - IMAGEARRAYINDEX = layout.offsetof(2); - } - - /** - * Creates a {@code XrSwapchainSubImage} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSwapchainSubImage(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code swapchain} field. */ - @NativeType("XrSwapchain") - public long swapchain() { return nswapchain(address()); } - /** @return a {@link XrRect2Di} view of the {@code imageRect} field. */ - public XrRect2Di imageRect() { return nimageRect(address()); } - /** @return the value of the {@code imageArrayIndex} field. */ - @NativeType("uint32_t") - public int imageArrayIndex() { return nimageArrayIndex(address()); } - - /** Sets the specified value to the {@code swapchain} field. */ - public XrSwapchainSubImage swapchain(XrSwapchain value) { nswapchain(address(), value); return this; } - /** Copies the specified {@link XrRect2Di} to the {@code imageRect} field. */ - public XrSwapchainSubImage imageRect(XrRect2Di value) { nimageRect(address(), value); return this; } - /** Passes the {@code imageRect} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrSwapchainSubImage imageRect(java.util.function.Consumer consumer) { consumer.accept(imageRect()); return this; } - /** Sets the specified value to the {@code imageArrayIndex} field. */ - public XrSwapchainSubImage imageArrayIndex(@NativeType("uint32_t") int value) { nimageArrayIndex(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrSwapchainSubImage set( - XrSwapchain swapchain, - XrRect2Di imageRect, - int imageArrayIndex - ) { - swapchain(swapchain); - imageRect(imageRect); - imageArrayIndex(imageArrayIndex); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSwapchainSubImage set(XrSwapchainSubImage src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSwapchainSubImage} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSwapchainSubImage malloc() { - return wrap(XrSwapchainSubImage.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSwapchainSubImage} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSwapchainSubImage calloc() { - return wrap(XrSwapchainSubImage.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSwapchainSubImage} instance allocated with {@link BufferUtils}. */ - public static XrSwapchainSubImage create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSwapchainSubImage.class, memAddress(container), container); - } - - /** Returns a new {@code XrSwapchainSubImage} instance for the specified memory address. */ - public static XrSwapchainSubImage create(long address) { - return wrap(XrSwapchainSubImage.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSwapchainSubImage createSafe(long address) { - return address == NULL ? null : wrap(XrSwapchainSubImage.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSwapchainSubImage.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSwapchainSubImage} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSwapchainSubImage malloc(MemoryStack stack) { - return wrap(XrSwapchainSubImage.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSwapchainSubImage} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSwapchainSubImage calloc(MemoryStack stack) { - return wrap(XrSwapchainSubImage.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #swapchain}. */ - public static long nswapchain(long struct) { return memGetAddress(struct + XrSwapchainSubImage.SWAPCHAIN); } - /** Unsafe version of {@link #imageRect}. */ - public static XrRect2Di nimageRect(long struct) { return XrRect2Di.create(struct + XrSwapchainSubImage.IMAGERECT); } - /** Unsafe version of {@link #imageArrayIndex}. */ - public static int nimageArrayIndex(long struct) { return UNSAFE.getInt(null, struct + XrSwapchainSubImage.IMAGEARRAYINDEX); } - - /** Unsafe version of {@link #swapchain(XrSwapchain) swapchain}. */ - public static void nswapchain(long struct, XrSwapchain value) { memPutAddress(struct + XrSwapchainSubImage.SWAPCHAIN, value.address()); } - /** Unsafe version of {@link #imageRect(XrRect2Di) imageRect}. */ - public static void nimageRect(long struct, XrRect2Di value) { memCopy(value.address(), struct + XrSwapchainSubImage.IMAGERECT, XrRect2Di.SIZEOF); } - /** Unsafe version of {@link #imageArrayIndex(int) imageArrayIndex}. */ - public static void nimageArrayIndex(long struct, int value) { UNSAFE.putInt(null, struct + XrSwapchainSubImage.IMAGEARRAYINDEX, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XrSwapchainSubImage.SWAPCHAIN)); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrSwapchainSubImage} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSwapchainSubImage ELEMENT_FACTORY = XrSwapchainSubImage.create(-1L); - - /** - * Creates a new {@code XrSwapchainSubImage.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSwapchainSubImage#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSwapchainSubImage getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code swapchain} field. */ - @NativeType("XrSwapchain") - public long swapchain() { return XrSwapchainSubImage.nswapchain(address()); } - /** @return a {@link XrRect2Di} view of the {@code imageRect} field. */ - public XrRect2Di imageRect() { return XrSwapchainSubImage.nimageRect(address()); } - /** @return the value of the {@code imageArrayIndex} field. */ - @NativeType("uint32_t") - public int imageArrayIndex() { return XrSwapchainSubImage.nimageArrayIndex(address()); } - - /** Sets the specified value to the {@code swapchain} field. */ - public Buffer swapchain(XrSwapchain value) { XrSwapchainSubImage.nswapchain(address(), value); return this; } - /** Copies the specified {@link XrRect2Di} to the {@code imageRect} field. */ - public Buffer imageRect(XrRect2Di value) { XrSwapchainSubImage.nimageRect(address(), value); return this; } - /** Passes the {@code imageRect} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer imageRect(java.util.function.Consumer consumer) { consumer.accept(imageRect()); return this; } - /** Sets the specified value to the {@code imageArrayIndex} field. */ - public Buffer imageArrayIndex(@NativeType("uint32_t") int value) { XrSwapchainSubImage.nimageArrayIndex(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSystemColorSpacePropertiesFB.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSystemColorSpacePropertiesFB.java deleted file mode 100644 index f31a7f44..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSystemColorSpacePropertiesFB.java +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSystemColorSpacePropertiesFB {
- *     XrStructureType type;
- *     void * next;
- *     XrColorSpaceFB colorSpace;
- * }
- */ -public class XrSystemColorSpacePropertiesFB extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - COLORSPACE; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - COLORSPACE = layout.offsetof(2); - } - - /** - * Creates a {@code XrSystemColorSpacePropertiesFB} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSystemColorSpacePropertiesFB(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return the value of the {@code colorSpace} field. */ - @NativeType("XrColorSpaceFB") - public int colorSpace() { return ncolorSpace(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrSystemColorSpacePropertiesFB type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link FBColorSpace#XR_TYPE_SYSTEM_COLOR_SPACE_PROPERTIES_FB TYPE_SYSTEM_COLOR_SPACE_PROPERTIES_FB} value to the {@code type} field. */ - public XrSystemColorSpacePropertiesFB type$Default() { return type(FBColorSpace.XR_TYPE_SYSTEM_COLOR_SPACE_PROPERTIES_FB); } - /** Sets the specified value to the {@code next} field. */ - public XrSystemColorSpacePropertiesFB next(@NativeType("void *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code colorSpace} field. */ - public XrSystemColorSpacePropertiesFB colorSpace(@NativeType("XrColorSpaceFB") int value) { ncolorSpace(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrSystemColorSpacePropertiesFB set( - int type, - long next, - int colorSpace - ) { - type(type); - next(next); - colorSpace(colorSpace); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSystemColorSpacePropertiesFB set(XrSystemColorSpacePropertiesFB src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSystemColorSpacePropertiesFB} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSystemColorSpacePropertiesFB malloc() { - return wrap(XrSystemColorSpacePropertiesFB.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSystemColorSpacePropertiesFB} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSystemColorSpacePropertiesFB calloc() { - return wrap(XrSystemColorSpacePropertiesFB.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSystemColorSpacePropertiesFB} instance allocated with {@link BufferUtils}. */ - public static XrSystemColorSpacePropertiesFB create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSystemColorSpacePropertiesFB.class, memAddress(container), container); - } - - /** Returns a new {@code XrSystemColorSpacePropertiesFB} instance for the specified memory address. */ - public static XrSystemColorSpacePropertiesFB create(long address) { - return wrap(XrSystemColorSpacePropertiesFB.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSystemColorSpacePropertiesFB createSafe(long address) { - return address == NULL ? null : wrap(XrSystemColorSpacePropertiesFB.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSystemColorSpacePropertiesFB.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSystemColorSpacePropertiesFB} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSystemColorSpacePropertiesFB malloc(MemoryStack stack) { - return wrap(XrSystemColorSpacePropertiesFB.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSystemColorSpacePropertiesFB} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSystemColorSpacePropertiesFB calloc(MemoryStack stack) { - return wrap(XrSystemColorSpacePropertiesFB.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSystemColorSpacePropertiesFB.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSystemColorSpacePropertiesFB.NEXT); } - /** Unsafe version of {@link #colorSpace}. */ - public static int ncolorSpace(long struct) { return UNSAFE.getInt(null, struct + XrSystemColorSpacePropertiesFB.COLORSPACE); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSystemColorSpacePropertiesFB.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSystemColorSpacePropertiesFB.NEXT, value); } - /** Unsafe version of {@link #colorSpace(int) colorSpace}. */ - public static void ncolorSpace(long struct, int value) { UNSAFE.putInt(null, struct + XrSystemColorSpacePropertiesFB.COLORSPACE, value); } - - // ----------------------------------- - - /** An array of {@link XrSystemColorSpacePropertiesFB} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSystemColorSpacePropertiesFB ELEMENT_FACTORY = XrSystemColorSpacePropertiesFB.create(-1L); - - /** - * Creates a new {@code XrSystemColorSpacePropertiesFB.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSystemColorSpacePropertiesFB#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSystemColorSpacePropertiesFB getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSystemColorSpacePropertiesFB.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrSystemColorSpacePropertiesFB.nnext(address()); } - /** @return the value of the {@code colorSpace} field. */ - @NativeType("XrColorSpaceFB") - public int colorSpace() { return XrSystemColorSpacePropertiesFB.ncolorSpace(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSystemColorSpacePropertiesFB.ntype(address(), value); return this; } - /** Sets the {@link FBColorSpace#XR_TYPE_SYSTEM_COLOR_SPACE_PROPERTIES_FB TYPE_SYSTEM_COLOR_SPACE_PROPERTIES_FB} value to the {@code type} field. */ - public Buffer type$Default() { return type(FBColorSpace.XR_TYPE_SYSTEM_COLOR_SPACE_PROPERTIES_FB); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrSystemColorSpacePropertiesFB.nnext(address(), value); return this; } - /** Sets the specified value to the {@code colorSpace} field. */ - public Buffer colorSpace(@NativeType("XrColorSpaceFB") int value) { XrSystemColorSpacePropertiesFB.ncolorSpace(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSystemEyeGazeInteractionPropertiesEXT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSystemEyeGazeInteractionPropertiesEXT.java deleted file mode 100644 index bdb5f8aa..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSystemEyeGazeInteractionPropertiesEXT.java +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSystemEyeGazeInteractionPropertiesEXT {
- *     XrStructureType type;
- *     void * next;
- *     XrBool32 supportsEyeGazeInteraction;
- * }
- */ -public class XrSystemEyeGazeInteractionPropertiesEXT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - SUPPORTSEYEGAZEINTERACTION; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - SUPPORTSEYEGAZEINTERACTION = layout.offsetof(2); - } - - /** - * Creates a {@code XrSystemEyeGazeInteractionPropertiesEXT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSystemEyeGazeInteractionPropertiesEXT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return the value of the {@code supportsEyeGazeInteraction} field. */ - @NativeType("XrBool32") - public boolean supportsEyeGazeInteraction() { return nsupportsEyeGazeInteraction(address()) != 0; } - - /** Sets the specified value to the {@code type} field. */ - public XrSystemEyeGazeInteractionPropertiesEXT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link EXTEyeGazeInteraction#XR_TYPE_SYSTEM_EYE_GAZE_INTERACTION_PROPERTIES_EXT TYPE_SYSTEM_EYE_GAZE_INTERACTION_PROPERTIES_EXT} value to the {@code type} field. */ - public XrSystemEyeGazeInteractionPropertiesEXT type$Default() { return type(EXTEyeGazeInteraction.XR_TYPE_SYSTEM_EYE_GAZE_INTERACTION_PROPERTIES_EXT); } - /** Sets the specified value to the {@code next} field. */ - public XrSystemEyeGazeInteractionPropertiesEXT next(@NativeType("void *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code supportsEyeGazeInteraction} field. */ - public XrSystemEyeGazeInteractionPropertiesEXT supportsEyeGazeInteraction(@NativeType("XrBool32") boolean value) { nsupportsEyeGazeInteraction(address(), value ? 1 : 0); return this; } - - /** Initializes this struct with the specified values. */ - public XrSystemEyeGazeInteractionPropertiesEXT set( - int type, - long next, - boolean supportsEyeGazeInteraction - ) { - type(type); - next(next); - supportsEyeGazeInteraction(supportsEyeGazeInteraction); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSystemEyeGazeInteractionPropertiesEXT set(XrSystemEyeGazeInteractionPropertiesEXT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSystemEyeGazeInteractionPropertiesEXT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSystemEyeGazeInteractionPropertiesEXT malloc() { - return wrap(XrSystemEyeGazeInteractionPropertiesEXT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSystemEyeGazeInteractionPropertiesEXT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSystemEyeGazeInteractionPropertiesEXT calloc() { - return wrap(XrSystemEyeGazeInteractionPropertiesEXT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSystemEyeGazeInteractionPropertiesEXT} instance allocated with {@link BufferUtils}. */ - public static XrSystemEyeGazeInteractionPropertiesEXT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSystemEyeGazeInteractionPropertiesEXT.class, memAddress(container), container); - } - - /** Returns a new {@code XrSystemEyeGazeInteractionPropertiesEXT} instance for the specified memory address. */ - public static XrSystemEyeGazeInteractionPropertiesEXT create(long address) { - return wrap(XrSystemEyeGazeInteractionPropertiesEXT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSystemEyeGazeInteractionPropertiesEXT createSafe(long address) { - return address == NULL ? null : wrap(XrSystemEyeGazeInteractionPropertiesEXT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSystemEyeGazeInteractionPropertiesEXT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSystemEyeGazeInteractionPropertiesEXT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSystemEyeGazeInteractionPropertiesEXT malloc(MemoryStack stack) { - return wrap(XrSystemEyeGazeInteractionPropertiesEXT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSystemEyeGazeInteractionPropertiesEXT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSystemEyeGazeInteractionPropertiesEXT calloc(MemoryStack stack) { - return wrap(XrSystemEyeGazeInteractionPropertiesEXT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSystemEyeGazeInteractionPropertiesEXT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSystemEyeGazeInteractionPropertiesEXT.NEXT); } - /** Unsafe version of {@link #supportsEyeGazeInteraction}. */ - public static int nsupportsEyeGazeInteraction(long struct) { return UNSAFE.getInt(null, struct + XrSystemEyeGazeInteractionPropertiesEXT.SUPPORTSEYEGAZEINTERACTION); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSystemEyeGazeInteractionPropertiesEXT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSystemEyeGazeInteractionPropertiesEXT.NEXT, value); } - /** Unsafe version of {@link #supportsEyeGazeInteraction(boolean) supportsEyeGazeInteraction}. */ - public static void nsupportsEyeGazeInteraction(long struct, int value) { UNSAFE.putInt(null, struct + XrSystemEyeGazeInteractionPropertiesEXT.SUPPORTSEYEGAZEINTERACTION, value); } - - // ----------------------------------- - - /** An array of {@link XrSystemEyeGazeInteractionPropertiesEXT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSystemEyeGazeInteractionPropertiesEXT ELEMENT_FACTORY = XrSystemEyeGazeInteractionPropertiesEXT.create(-1L); - - /** - * Creates a new {@code XrSystemEyeGazeInteractionPropertiesEXT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSystemEyeGazeInteractionPropertiesEXT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSystemEyeGazeInteractionPropertiesEXT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSystemEyeGazeInteractionPropertiesEXT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrSystemEyeGazeInteractionPropertiesEXT.nnext(address()); } - /** @return the value of the {@code supportsEyeGazeInteraction} field. */ - @NativeType("XrBool32") - public boolean supportsEyeGazeInteraction() { return XrSystemEyeGazeInteractionPropertiesEXT.nsupportsEyeGazeInteraction(address()) != 0; } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSystemEyeGazeInteractionPropertiesEXT.ntype(address(), value); return this; } - /** Sets the {@link EXTEyeGazeInteraction#XR_TYPE_SYSTEM_EYE_GAZE_INTERACTION_PROPERTIES_EXT TYPE_SYSTEM_EYE_GAZE_INTERACTION_PROPERTIES_EXT} value to the {@code type} field. */ - public Buffer type$Default() { return type(EXTEyeGazeInteraction.XR_TYPE_SYSTEM_EYE_GAZE_INTERACTION_PROPERTIES_EXT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrSystemEyeGazeInteractionPropertiesEXT.nnext(address(), value); return this; } - /** Sets the specified value to the {@code supportsEyeGazeInteraction} field. */ - public Buffer supportsEyeGazeInteraction(@NativeType("XrBool32") boolean value) { XrSystemEyeGazeInteractionPropertiesEXT.nsupportsEyeGazeInteraction(address(), value ? 1 : 0); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSystemFoveatedRenderingPropertiesVARJO.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSystemFoveatedRenderingPropertiesVARJO.java deleted file mode 100644 index 9b3ed521..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSystemFoveatedRenderingPropertiesVARJO.java +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSystemFoveatedRenderingPropertiesVARJO {
- *     XrStructureType type;
- *     void * next;
- *     XrBool32 supportsFoveatedRendering;
- * }
- */ -public class XrSystemFoveatedRenderingPropertiesVARJO extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - SUPPORTSFOVEATEDRENDERING; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - SUPPORTSFOVEATEDRENDERING = layout.offsetof(2); - } - - /** - * Creates a {@code XrSystemFoveatedRenderingPropertiesVARJO} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSystemFoveatedRenderingPropertiesVARJO(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return the value of the {@code supportsFoveatedRendering} field. */ - @NativeType("XrBool32") - public boolean supportsFoveatedRendering() { return nsupportsFoveatedRendering(address()) != 0; } - - /** Sets the specified value to the {@code type} field. */ - public XrSystemFoveatedRenderingPropertiesVARJO type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link VARJOFoveatedRendering#XR_TYPE_SYSTEM_FOVEATED_RENDERING_PROPERTIES_VARJO TYPE_SYSTEM_FOVEATED_RENDERING_PROPERTIES_VARJO} value to the {@code type} field. */ - public XrSystemFoveatedRenderingPropertiesVARJO type$Default() { return type(VARJOFoveatedRendering.XR_TYPE_SYSTEM_FOVEATED_RENDERING_PROPERTIES_VARJO); } - /** Sets the specified value to the {@code next} field. */ - public XrSystemFoveatedRenderingPropertiesVARJO next(@NativeType("void *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code supportsFoveatedRendering} field. */ - public XrSystemFoveatedRenderingPropertiesVARJO supportsFoveatedRendering(@NativeType("XrBool32") boolean value) { nsupportsFoveatedRendering(address(), value ? 1 : 0); return this; } - - /** Initializes this struct with the specified values. */ - public XrSystemFoveatedRenderingPropertiesVARJO set( - int type, - long next, - boolean supportsFoveatedRendering - ) { - type(type); - next(next); - supportsFoveatedRendering(supportsFoveatedRendering); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSystemFoveatedRenderingPropertiesVARJO set(XrSystemFoveatedRenderingPropertiesVARJO src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSystemFoveatedRenderingPropertiesVARJO} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSystemFoveatedRenderingPropertiesVARJO malloc() { - return wrap(XrSystemFoveatedRenderingPropertiesVARJO.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSystemFoveatedRenderingPropertiesVARJO} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSystemFoveatedRenderingPropertiesVARJO calloc() { - return wrap(XrSystemFoveatedRenderingPropertiesVARJO.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSystemFoveatedRenderingPropertiesVARJO} instance allocated with {@link BufferUtils}. */ - public static XrSystemFoveatedRenderingPropertiesVARJO create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSystemFoveatedRenderingPropertiesVARJO.class, memAddress(container), container); - } - - /** Returns a new {@code XrSystemFoveatedRenderingPropertiesVARJO} instance for the specified memory address. */ - public static XrSystemFoveatedRenderingPropertiesVARJO create(long address) { - return wrap(XrSystemFoveatedRenderingPropertiesVARJO.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSystemFoveatedRenderingPropertiesVARJO createSafe(long address) { - return address == NULL ? null : wrap(XrSystemFoveatedRenderingPropertiesVARJO.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSystemFoveatedRenderingPropertiesVARJO.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSystemFoveatedRenderingPropertiesVARJO} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSystemFoveatedRenderingPropertiesVARJO malloc(MemoryStack stack) { - return wrap(XrSystemFoveatedRenderingPropertiesVARJO.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSystemFoveatedRenderingPropertiesVARJO} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSystemFoveatedRenderingPropertiesVARJO calloc(MemoryStack stack) { - return wrap(XrSystemFoveatedRenderingPropertiesVARJO.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSystemFoveatedRenderingPropertiesVARJO.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSystemFoveatedRenderingPropertiesVARJO.NEXT); } - /** Unsafe version of {@link #supportsFoveatedRendering}. */ - public static int nsupportsFoveatedRendering(long struct) { return UNSAFE.getInt(null, struct + XrSystemFoveatedRenderingPropertiesVARJO.SUPPORTSFOVEATEDRENDERING); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSystemFoveatedRenderingPropertiesVARJO.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSystemFoveatedRenderingPropertiesVARJO.NEXT, value); } - /** Unsafe version of {@link #supportsFoveatedRendering(boolean) supportsFoveatedRendering}. */ - public static void nsupportsFoveatedRendering(long struct, int value) { UNSAFE.putInt(null, struct + XrSystemFoveatedRenderingPropertiesVARJO.SUPPORTSFOVEATEDRENDERING, value); } - - // ----------------------------------- - - /** An array of {@link XrSystemFoveatedRenderingPropertiesVARJO} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSystemFoveatedRenderingPropertiesVARJO ELEMENT_FACTORY = XrSystemFoveatedRenderingPropertiesVARJO.create(-1L); - - /** - * Creates a new {@code XrSystemFoveatedRenderingPropertiesVARJO.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSystemFoveatedRenderingPropertiesVARJO#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSystemFoveatedRenderingPropertiesVARJO getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSystemFoveatedRenderingPropertiesVARJO.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrSystemFoveatedRenderingPropertiesVARJO.nnext(address()); } - /** @return the value of the {@code supportsFoveatedRendering} field. */ - @NativeType("XrBool32") - public boolean supportsFoveatedRendering() { return XrSystemFoveatedRenderingPropertiesVARJO.nsupportsFoveatedRendering(address()) != 0; } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSystemFoveatedRenderingPropertiesVARJO.ntype(address(), value); return this; } - /** Sets the {@link VARJOFoveatedRendering#XR_TYPE_SYSTEM_FOVEATED_RENDERING_PROPERTIES_VARJO TYPE_SYSTEM_FOVEATED_RENDERING_PROPERTIES_VARJO} value to the {@code type} field. */ - public Buffer type$Default() { return type(VARJOFoveatedRendering.XR_TYPE_SYSTEM_FOVEATED_RENDERING_PROPERTIES_VARJO); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrSystemFoveatedRenderingPropertiesVARJO.nnext(address(), value); return this; } - /** Sets the specified value to the {@code supportsFoveatedRendering} field. */ - public Buffer supportsFoveatedRendering(@NativeType("XrBool32") boolean value) { XrSystemFoveatedRenderingPropertiesVARJO.nsupportsFoveatedRendering(address(), value ? 1 : 0); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSystemGetInfo.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSystemGetInfo.java deleted file mode 100644 index 8d003b39..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSystemGetInfo.java +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSystemGetInfo {
- *     XrStructureType type;
- *     void const * next;
- *     XrFormFactor formFactor;
- * }
- */ -public class XrSystemGetInfo extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - FORMFACTOR; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - FORMFACTOR = layout.offsetof(2); - } - - /** - * Creates a {@code XrSystemGetInfo} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSystemGetInfo(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code formFactor} field. */ - @NativeType("XrFormFactor") - public int formFactor() { return nformFactor(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrSystemGetInfo type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_SYSTEM_GET_INFO TYPE_SYSTEM_GET_INFO} value to the {@code type} field. */ - public XrSystemGetInfo type$Default() { return type(XR10.XR_TYPE_SYSTEM_GET_INFO); } - /** Sets the specified value to the {@code next} field. */ - public XrSystemGetInfo next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code formFactor} field. */ - public XrSystemGetInfo formFactor(@NativeType("XrFormFactor") int value) { nformFactor(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrSystemGetInfo set( - int type, - long next, - int formFactor - ) { - type(type); - next(next); - formFactor(formFactor); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSystemGetInfo set(XrSystemGetInfo src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSystemGetInfo} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSystemGetInfo malloc() { - return wrap(XrSystemGetInfo.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSystemGetInfo} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSystemGetInfo calloc() { - return wrap(XrSystemGetInfo.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSystemGetInfo} instance allocated with {@link BufferUtils}. */ - public static XrSystemGetInfo create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSystemGetInfo.class, memAddress(container), container); - } - - /** Returns a new {@code XrSystemGetInfo} instance for the specified memory address. */ - public static XrSystemGetInfo create(long address) { - return wrap(XrSystemGetInfo.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSystemGetInfo createSafe(long address) { - return address == NULL ? null : wrap(XrSystemGetInfo.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSystemGetInfo.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSystemGetInfo} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSystemGetInfo malloc(MemoryStack stack) { - return wrap(XrSystemGetInfo.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSystemGetInfo} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSystemGetInfo calloc(MemoryStack stack) { - return wrap(XrSystemGetInfo.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSystemGetInfo.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSystemGetInfo.NEXT); } - /** Unsafe version of {@link #formFactor}. */ - public static int nformFactor(long struct) { return UNSAFE.getInt(null, struct + XrSystemGetInfo.FORMFACTOR); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSystemGetInfo.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSystemGetInfo.NEXT, value); } - /** Unsafe version of {@link #formFactor(int) formFactor}. */ - public static void nformFactor(long struct, int value) { UNSAFE.putInt(null, struct + XrSystemGetInfo.FORMFACTOR, value); } - - // ----------------------------------- - - /** An array of {@link XrSystemGetInfo} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSystemGetInfo ELEMENT_FACTORY = XrSystemGetInfo.create(-1L); - - /** - * Creates a new {@code XrSystemGetInfo.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSystemGetInfo#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSystemGetInfo getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSystemGetInfo.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrSystemGetInfo.nnext(address()); } - /** @return the value of the {@code formFactor} field. */ - @NativeType("XrFormFactor") - public int formFactor() { return XrSystemGetInfo.nformFactor(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSystemGetInfo.ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_SYSTEM_GET_INFO TYPE_SYSTEM_GET_INFO} value to the {@code type} field. */ - public Buffer type$Default() { return type(XR10.XR_TYPE_SYSTEM_GET_INFO); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrSystemGetInfo.nnext(address(), value); return this; } - /** Sets the specified value to the {@code formFactor} field. */ - public Buffer formFactor(@NativeType("XrFormFactor") int value) { XrSystemGetInfo.nformFactor(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSystemGraphicsProperties.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSystemGraphicsProperties.java deleted file mode 100644 index e9da1411..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSystemGraphicsProperties.java +++ /dev/null @@ -1,295 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSystemGraphicsProperties {
- *     uint32_t maxSwapchainImageHeight;
- *     uint32_t maxSwapchainImageWidth;
- *     uint32_t maxLayerCount;
- * }
- */ -public class XrSystemGraphicsProperties extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - MAXSWAPCHAINIMAGEHEIGHT, - MAXSWAPCHAINIMAGEWIDTH, - MAXLAYERCOUNT; - - static { - Layout layout = __struct( - __member(4), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - MAXSWAPCHAINIMAGEHEIGHT = layout.offsetof(0); - MAXSWAPCHAINIMAGEWIDTH = layout.offsetof(1); - MAXLAYERCOUNT = layout.offsetof(2); - } - - /** - * Creates a {@code XrSystemGraphicsProperties} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSystemGraphicsProperties(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code maxSwapchainImageHeight} field. */ - @NativeType("uint32_t") - public int maxSwapchainImageHeight() { return nmaxSwapchainImageHeight(address()); } - /** @return the value of the {@code maxSwapchainImageWidth} field. */ - @NativeType("uint32_t") - public int maxSwapchainImageWidth() { return nmaxSwapchainImageWidth(address()); } - /** @return the value of the {@code maxLayerCount} field. */ - @NativeType("uint32_t") - public int maxLayerCount() { return nmaxLayerCount(address()); } - - /** Sets the specified value to the {@code maxSwapchainImageHeight} field. */ - public XrSystemGraphicsProperties maxSwapchainImageHeight(@NativeType("uint32_t") int value) { nmaxSwapchainImageHeight(address(), value); return this; } - /** Sets the specified value to the {@code maxSwapchainImageWidth} field. */ - public XrSystemGraphicsProperties maxSwapchainImageWidth(@NativeType("uint32_t") int value) { nmaxSwapchainImageWidth(address(), value); return this; } - /** Sets the specified value to the {@code maxLayerCount} field. */ - public XrSystemGraphicsProperties maxLayerCount(@NativeType("uint32_t") int value) { nmaxLayerCount(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrSystemGraphicsProperties set( - int maxSwapchainImageHeight, - int maxSwapchainImageWidth, - int maxLayerCount - ) { - maxSwapchainImageHeight(maxSwapchainImageHeight); - maxSwapchainImageWidth(maxSwapchainImageWidth); - maxLayerCount(maxLayerCount); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSystemGraphicsProperties set(XrSystemGraphicsProperties src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSystemGraphicsProperties} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSystemGraphicsProperties malloc() { - return wrap(XrSystemGraphicsProperties.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSystemGraphicsProperties} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSystemGraphicsProperties calloc() { - return wrap(XrSystemGraphicsProperties.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSystemGraphicsProperties} instance allocated with {@link BufferUtils}. */ - public static XrSystemGraphicsProperties create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSystemGraphicsProperties.class, memAddress(container), container); - } - - /** Returns a new {@code XrSystemGraphicsProperties} instance for the specified memory address. */ - public static XrSystemGraphicsProperties create(long address) { - return wrap(XrSystemGraphicsProperties.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSystemGraphicsProperties createSafe(long address) { - return address == NULL ? null : wrap(XrSystemGraphicsProperties.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSystemGraphicsProperties.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSystemGraphicsProperties} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSystemGraphicsProperties malloc(MemoryStack stack) { - return wrap(XrSystemGraphicsProperties.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSystemGraphicsProperties} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSystemGraphicsProperties calloc(MemoryStack stack) { - return wrap(XrSystemGraphicsProperties.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #maxSwapchainImageHeight}. */ - public static int nmaxSwapchainImageHeight(long struct) { return UNSAFE.getInt(null, struct + XrSystemGraphicsProperties.MAXSWAPCHAINIMAGEHEIGHT); } - /** Unsafe version of {@link #maxSwapchainImageWidth}. */ - public static int nmaxSwapchainImageWidth(long struct) { return UNSAFE.getInt(null, struct + XrSystemGraphicsProperties.MAXSWAPCHAINIMAGEWIDTH); } - /** Unsafe version of {@link #maxLayerCount}. */ - public static int nmaxLayerCount(long struct) { return UNSAFE.getInt(null, struct + XrSystemGraphicsProperties.MAXLAYERCOUNT); } - - /** Unsafe version of {@link #maxSwapchainImageHeight(int) maxSwapchainImageHeight}. */ - public static void nmaxSwapchainImageHeight(long struct, int value) { UNSAFE.putInt(null, struct + XrSystemGraphicsProperties.MAXSWAPCHAINIMAGEHEIGHT, value); } - /** Unsafe version of {@link #maxSwapchainImageWidth(int) maxSwapchainImageWidth}. */ - public static void nmaxSwapchainImageWidth(long struct, int value) { UNSAFE.putInt(null, struct + XrSystemGraphicsProperties.MAXSWAPCHAINIMAGEWIDTH, value); } - /** Unsafe version of {@link #maxLayerCount(int) maxLayerCount}. */ - public static void nmaxLayerCount(long struct, int value) { UNSAFE.putInt(null, struct + XrSystemGraphicsProperties.MAXLAYERCOUNT, value); } - - // ----------------------------------- - - /** An array of {@link XrSystemGraphicsProperties} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSystemGraphicsProperties ELEMENT_FACTORY = XrSystemGraphicsProperties.create(-1L); - - /** - * Creates a new {@code XrSystemGraphicsProperties.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSystemGraphicsProperties#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSystemGraphicsProperties getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code maxSwapchainImageHeight} field. */ - @NativeType("uint32_t") - public int maxSwapchainImageHeight() { return XrSystemGraphicsProperties.nmaxSwapchainImageHeight(address()); } - /** @return the value of the {@code maxSwapchainImageWidth} field. */ - @NativeType("uint32_t") - public int maxSwapchainImageWidth() { return XrSystemGraphicsProperties.nmaxSwapchainImageWidth(address()); } - /** @return the value of the {@code maxLayerCount} field. */ - @NativeType("uint32_t") - public int maxLayerCount() { return XrSystemGraphicsProperties.nmaxLayerCount(address()); } - - /** Sets the specified value to the {@code maxSwapchainImageHeight} field. */ - public Buffer maxSwapchainImageHeight(@NativeType("uint32_t") int value) { XrSystemGraphicsProperties.nmaxSwapchainImageHeight(address(), value); return this; } - /** Sets the specified value to the {@code maxSwapchainImageWidth} field. */ - public Buffer maxSwapchainImageWidth(@NativeType("uint32_t") int value) { XrSystemGraphicsProperties.nmaxSwapchainImageWidth(address(), value); return this; } - /** Sets the specified value to the {@code maxLayerCount} field. */ - public Buffer maxLayerCount(@NativeType("uint32_t") int value) { XrSystemGraphicsProperties.nmaxLayerCount(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSystemHandTrackingMeshPropertiesMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSystemHandTrackingMeshPropertiesMSFT.java deleted file mode 100644 index b4e1ce7a..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSystemHandTrackingMeshPropertiesMSFT.java +++ /dev/null @@ -1,339 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSystemHandTrackingMeshPropertiesMSFT {
- *     XrStructureType type;
- *     void * next;
- *     XrBool32 supportsHandTrackingMesh;
- *     uint32_t maxHandMeshIndexCount;
- *     uint32_t maxHandMeshVertexCount;
- * }
- */ -public class XrSystemHandTrackingMeshPropertiesMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - SUPPORTSHANDTRACKINGMESH, - MAXHANDMESHINDEXCOUNT, - MAXHANDMESHVERTEXCOUNT; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - SUPPORTSHANDTRACKINGMESH = layout.offsetof(2); - MAXHANDMESHINDEXCOUNT = layout.offsetof(3); - MAXHANDMESHVERTEXCOUNT = layout.offsetof(4); - } - - /** - * Creates a {@code XrSystemHandTrackingMeshPropertiesMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSystemHandTrackingMeshPropertiesMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return the value of the {@code supportsHandTrackingMesh} field. */ - @NativeType("XrBool32") - public boolean supportsHandTrackingMesh() { return nsupportsHandTrackingMesh(address()) != 0; } - /** @return the value of the {@code maxHandMeshIndexCount} field. */ - @NativeType("uint32_t") - public int maxHandMeshIndexCount() { return nmaxHandMeshIndexCount(address()); } - /** @return the value of the {@code maxHandMeshVertexCount} field. */ - @NativeType("uint32_t") - public int maxHandMeshVertexCount() { return nmaxHandMeshVertexCount(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrSystemHandTrackingMeshPropertiesMSFT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link MSFTHandTrackingMesh#XR_TYPE_SYSTEM_HAND_TRACKING_MESH_PROPERTIES_MSFT TYPE_SYSTEM_HAND_TRACKING_MESH_PROPERTIES_MSFT} value to the {@code type} field. */ - public XrSystemHandTrackingMeshPropertiesMSFT type$Default() { return type(MSFTHandTrackingMesh.XR_TYPE_SYSTEM_HAND_TRACKING_MESH_PROPERTIES_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public XrSystemHandTrackingMeshPropertiesMSFT next(@NativeType("void *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code supportsHandTrackingMesh} field. */ - public XrSystemHandTrackingMeshPropertiesMSFT supportsHandTrackingMesh(@NativeType("XrBool32") boolean value) { nsupportsHandTrackingMesh(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@code maxHandMeshIndexCount} field. */ - public XrSystemHandTrackingMeshPropertiesMSFT maxHandMeshIndexCount(@NativeType("uint32_t") int value) { nmaxHandMeshIndexCount(address(), value); return this; } - /** Sets the specified value to the {@code maxHandMeshVertexCount} field. */ - public XrSystemHandTrackingMeshPropertiesMSFT maxHandMeshVertexCount(@NativeType("uint32_t") int value) { nmaxHandMeshVertexCount(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrSystemHandTrackingMeshPropertiesMSFT set( - int type, - long next, - boolean supportsHandTrackingMesh, - int maxHandMeshIndexCount, - int maxHandMeshVertexCount - ) { - type(type); - next(next); - supportsHandTrackingMesh(supportsHandTrackingMesh); - maxHandMeshIndexCount(maxHandMeshIndexCount); - maxHandMeshVertexCount(maxHandMeshVertexCount); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSystemHandTrackingMeshPropertiesMSFT set(XrSystemHandTrackingMeshPropertiesMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSystemHandTrackingMeshPropertiesMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSystemHandTrackingMeshPropertiesMSFT malloc() { - return wrap(XrSystemHandTrackingMeshPropertiesMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSystemHandTrackingMeshPropertiesMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSystemHandTrackingMeshPropertiesMSFT calloc() { - return wrap(XrSystemHandTrackingMeshPropertiesMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSystemHandTrackingMeshPropertiesMSFT} instance allocated with {@link BufferUtils}. */ - public static XrSystemHandTrackingMeshPropertiesMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSystemHandTrackingMeshPropertiesMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrSystemHandTrackingMeshPropertiesMSFT} instance for the specified memory address. */ - public static XrSystemHandTrackingMeshPropertiesMSFT create(long address) { - return wrap(XrSystemHandTrackingMeshPropertiesMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSystemHandTrackingMeshPropertiesMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrSystemHandTrackingMeshPropertiesMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSystemHandTrackingMeshPropertiesMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSystemHandTrackingMeshPropertiesMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSystemHandTrackingMeshPropertiesMSFT malloc(MemoryStack stack) { - return wrap(XrSystemHandTrackingMeshPropertiesMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSystemHandTrackingMeshPropertiesMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSystemHandTrackingMeshPropertiesMSFT calloc(MemoryStack stack) { - return wrap(XrSystemHandTrackingMeshPropertiesMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSystemHandTrackingMeshPropertiesMSFT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSystemHandTrackingMeshPropertiesMSFT.NEXT); } - /** Unsafe version of {@link #supportsHandTrackingMesh}. */ - public static int nsupportsHandTrackingMesh(long struct) { return UNSAFE.getInt(null, struct + XrSystemHandTrackingMeshPropertiesMSFT.SUPPORTSHANDTRACKINGMESH); } - /** Unsafe version of {@link #maxHandMeshIndexCount}. */ - public static int nmaxHandMeshIndexCount(long struct) { return UNSAFE.getInt(null, struct + XrSystemHandTrackingMeshPropertiesMSFT.MAXHANDMESHINDEXCOUNT); } - /** Unsafe version of {@link #maxHandMeshVertexCount}. */ - public static int nmaxHandMeshVertexCount(long struct) { return UNSAFE.getInt(null, struct + XrSystemHandTrackingMeshPropertiesMSFT.MAXHANDMESHVERTEXCOUNT); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSystemHandTrackingMeshPropertiesMSFT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSystemHandTrackingMeshPropertiesMSFT.NEXT, value); } - /** Unsafe version of {@link #supportsHandTrackingMesh(boolean) supportsHandTrackingMesh}. */ - public static void nsupportsHandTrackingMesh(long struct, int value) { UNSAFE.putInt(null, struct + XrSystemHandTrackingMeshPropertiesMSFT.SUPPORTSHANDTRACKINGMESH, value); } - /** Unsafe version of {@link #maxHandMeshIndexCount(int) maxHandMeshIndexCount}. */ - public static void nmaxHandMeshIndexCount(long struct, int value) { UNSAFE.putInt(null, struct + XrSystemHandTrackingMeshPropertiesMSFT.MAXHANDMESHINDEXCOUNT, value); } - /** Unsafe version of {@link #maxHandMeshVertexCount(int) maxHandMeshVertexCount}. */ - public static void nmaxHandMeshVertexCount(long struct, int value) { UNSAFE.putInt(null, struct + XrSystemHandTrackingMeshPropertiesMSFT.MAXHANDMESHVERTEXCOUNT, value); } - - // ----------------------------------- - - /** An array of {@link XrSystemHandTrackingMeshPropertiesMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSystemHandTrackingMeshPropertiesMSFT ELEMENT_FACTORY = XrSystemHandTrackingMeshPropertiesMSFT.create(-1L); - - /** - * Creates a new {@code XrSystemHandTrackingMeshPropertiesMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSystemHandTrackingMeshPropertiesMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSystemHandTrackingMeshPropertiesMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSystemHandTrackingMeshPropertiesMSFT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrSystemHandTrackingMeshPropertiesMSFT.nnext(address()); } - /** @return the value of the {@code supportsHandTrackingMesh} field. */ - @NativeType("XrBool32") - public boolean supportsHandTrackingMesh() { return XrSystemHandTrackingMeshPropertiesMSFT.nsupportsHandTrackingMesh(address()) != 0; } - /** @return the value of the {@code maxHandMeshIndexCount} field. */ - @NativeType("uint32_t") - public int maxHandMeshIndexCount() { return XrSystemHandTrackingMeshPropertiesMSFT.nmaxHandMeshIndexCount(address()); } - /** @return the value of the {@code maxHandMeshVertexCount} field. */ - @NativeType("uint32_t") - public int maxHandMeshVertexCount() { return XrSystemHandTrackingMeshPropertiesMSFT.nmaxHandMeshVertexCount(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSystemHandTrackingMeshPropertiesMSFT.ntype(address(), value); return this; } - /** Sets the {@link MSFTHandTrackingMesh#XR_TYPE_SYSTEM_HAND_TRACKING_MESH_PROPERTIES_MSFT TYPE_SYSTEM_HAND_TRACKING_MESH_PROPERTIES_MSFT} value to the {@code type} field. */ - public Buffer type$Default() { return type(MSFTHandTrackingMesh.XR_TYPE_SYSTEM_HAND_TRACKING_MESH_PROPERTIES_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrSystemHandTrackingMeshPropertiesMSFT.nnext(address(), value); return this; } - /** Sets the specified value to the {@code supportsHandTrackingMesh} field. */ - public Buffer supportsHandTrackingMesh(@NativeType("XrBool32") boolean value) { XrSystemHandTrackingMeshPropertiesMSFT.nsupportsHandTrackingMesh(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@code maxHandMeshIndexCount} field. */ - public Buffer maxHandMeshIndexCount(@NativeType("uint32_t") int value) { XrSystemHandTrackingMeshPropertiesMSFT.nmaxHandMeshIndexCount(address(), value); return this; } - /** Sets the specified value to the {@code maxHandMeshVertexCount} field. */ - public Buffer maxHandMeshVertexCount(@NativeType("uint32_t") int value) { XrSystemHandTrackingMeshPropertiesMSFT.nmaxHandMeshVertexCount(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSystemHandTrackingPropertiesEXT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSystemHandTrackingPropertiesEXT.java deleted file mode 100644 index fc9624d9..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSystemHandTrackingPropertiesEXT.java +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSystemHandTrackingPropertiesEXT {
- *     XrStructureType type;
- *     void * next;
- *     XrBool32 supportsHandTracking;
- * }
- */ -public class XrSystemHandTrackingPropertiesEXT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - SUPPORTSHANDTRACKING; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - SUPPORTSHANDTRACKING = layout.offsetof(2); - } - - /** - * Creates a {@code XrSystemHandTrackingPropertiesEXT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSystemHandTrackingPropertiesEXT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return the value of the {@code supportsHandTracking} field. */ - @NativeType("XrBool32") - public boolean supportsHandTracking() { return nsupportsHandTracking(address()) != 0; } - - /** Sets the specified value to the {@code type} field. */ - public XrSystemHandTrackingPropertiesEXT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link EXTHandTracking#XR_TYPE_SYSTEM_HAND_TRACKING_PROPERTIES_EXT TYPE_SYSTEM_HAND_TRACKING_PROPERTIES_EXT} value to the {@code type} field. */ - public XrSystemHandTrackingPropertiesEXT type$Default() { return type(EXTHandTracking.XR_TYPE_SYSTEM_HAND_TRACKING_PROPERTIES_EXT); } - /** Sets the specified value to the {@code next} field. */ - public XrSystemHandTrackingPropertiesEXT next(@NativeType("void *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code supportsHandTracking} field. */ - public XrSystemHandTrackingPropertiesEXT supportsHandTracking(@NativeType("XrBool32") boolean value) { nsupportsHandTracking(address(), value ? 1 : 0); return this; } - - /** Initializes this struct with the specified values. */ - public XrSystemHandTrackingPropertiesEXT set( - int type, - long next, - boolean supportsHandTracking - ) { - type(type); - next(next); - supportsHandTracking(supportsHandTracking); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSystemHandTrackingPropertiesEXT set(XrSystemHandTrackingPropertiesEXT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSystemHandTrackingPropertiesEXT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSystemHandTrackingPropertiesEXT malloc() { - return wrap(XrSystemHandTrackingPropertiesEXT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSystemHandTrackingPropertiesEXT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSystemHandTrackingPropertiesEXT calloc() { - return wrap(XrSystemHandTrackingPropertiesEXT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSystemHandTrackingPropertiesEXT} instance allocated with {@link BufferUtils}. */ - public static XrSystemHandTrackingPropertiesEXT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSystemHandTrackingPropertiesEXT.class, memAddress(container), container); - } - - /** Returns a new {@code XrSystemHandTrackingPropertiesEXT} instance for the specified memory address. */ - public static XrSystemHandTrackingPropertiesEXT create(long address) { - return wrap(XrSystemHandTrackingPropertiesEXT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSystemHandTrackingPropertiesEXT createSafe(long address) { - return address == NULL ? null : wrap(XrSystemHandTrackingPropertiesEXT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSystemHandTrackingPropertiesEXT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSystemHandTrackingPropertiesEXT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSystemHandTrackingPropertiesEXT malloc(MemoryStack stack) { - return wrap(XrSystemHandTrackingPropertiesEXT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSystemHandTrackingPropertiesEXT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSystemHandTrackingPropertiesEXT calloc(MemoryStack stack) { - return wrap(XrSystemHandTrackingPropertiesEXT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSystemHandTrackingPropertiesEXT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSystemHandTrackingPropertiesEXT.NEXT); } - /** Unsafe version of {@link #supportsHandTracking}. */ - public static int nsupportsHandTracking(long struct) { return UNSAFE.getInt(null, struct + XrSystemHandTrackingPropertiesEXT.SUPPORTSHANDTRACKING); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSystemHandTrackingPropertiesEXT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSystemHandTrackingPropertiesEXT.NEXT, value); } - /** Unsafe version of {@link #supportsHandTracking(boolean) supportsHandTracking}. */ - public static void nsupportsHandTracking(long struct, int value) { UNSAFE.putInt(null, struct + XrSystemHandTrackingPropertiesEXT.SUPPORTSHANDTRACKING, value); } - - // ----------------------------------- - - /** An array of {@link XrSystemHandTrackingPropertiesEXT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSystemHandTrackingPropertiesEXT ELEMENT_FACTORY = XrSystemHandTrackingPropertiesEXT.create(-1L); - - /** - * Creates a new {@code XrSystemHandTrackingPropertiesEXT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSystemHandTrackingPropertiesEXT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSystemHandTrackingPropertiesEXT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSystemHandTrackingPropertiesEXT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrSystemHandTrackingPropertiesEXT.nnext(address()); } - /** @return the value of the {@code supportsHandTracking} field. */ - @NativeType("XrBool32") - public boolean supportsHandTracking() { return XrSystemHandTrackingPropertiesEXT.nsupportsHandTracking(address()) != 0; } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSystemHandTrackingPropertiesEXT.ntype(address(), value); return this; } - /** Sets the {@link EXTHandTracking#XR_TYPE_SYSTEM_HAND_TRACKING_PROPERTIES_EXT TYPE_SYSTEM_HAND_TRACKING_PROPERTIES_EXT} value to the {@code type} field. */ - public Buffer type$Default() { return type(EXTHandTracking.XR_TYPE_SYSTEM_HAND_TRACKING_PROPERTIES_EXT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrSystemHandTrackingPropertiesEXT.nnext(address(), value); return this; } - /** Sets the specified value to the {@code supportsHandTracking} field. */ - public Buffer supportsHandTracking(@NativeType("XrBool32") boolean value) { XrSystemHandTrackingPropertiesEXT.nsupportsHandTracking(address(), value ? 1 : 0); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSystemMarkerTrackingPropertiesVARJO.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSystemMarkerTrackingPropertiesVARJO.java deleted file mode 100644 index 3658b093..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSystemMarkerTrackingPropertiesVARJO.java +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSystemMarkerTrackingPropertiesVARJO {
- *     XrStructureType type;
- *     void * next;
- *     XrBool32 supportsMarkerTracking;
- * }
- */ -public class XrSystemMarkerTrackingPropertiesVARJO extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - SUPPORTSMARKERTRACKING; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - SUPPORTSMARKERTRACKING = layout.offsetof(2); - } - - /** - * Creates a {@code XrSystemMarkerTrackingPropertiesVARJO} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSystemMarkerTrackingPropertiesVARJO(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return the value of the {@code supportsMarkerTracking} field. */ - @NativeType("XrBool32") - public boolean supportsMarkerTracking() { return nsupportsMarkerTracking(address()) != 0; } - - /** Sets the specified value to the {@code type} field. */ - public XrSystemMarkerTrackingPropertiesVARJO type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link VARJOMarkerTracking#XR_TYPE_SYSTEM_MARKER_TRACKING_PROPERTIES_VARJO TYPE_SYSTEM_MARKER_TRACKING_PROPERTIES_VARJO} value to the {@code type} field. */ - public XrSystemMarkerTrackingPropertiesVARJO type$Default() { return type(VARJOMarkerTracking.XR_TYPE_SYSTEM_MARKER_TRACKING_PROPERTIES_VARJO); } - /** Sets the specified value to the {@code next} field. */ - public XrSystemMarkerTrackingPropertiesVARJO next(@NativeType("void *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code supportsMarkerTracking} field. */ - public XrSystemMarkerTrackingPropertiesVARJO supportsMarkerTracking(@NativeType("XrBool32") boolean value) { nsupportsMarkerTracking(address(), value ? 1 : 0); return this; } - - /** Initializes this struct with the specified values. */ - public XrSystemMarkerTrackingPropertiesVARJO set( - int type, - long next, - boolean supportsMarkerTracking - ) { - type(type); - next(next); - supportsMarkerTracking(supportsMarkerTracking); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSystemMarkerTrackingPropertiesVARJO set(XrSystemMarkerTrackingPropertiesVARJO src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSystemMarkerTrackingPropertiesVARJO} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSystemMarkerTrackingPropertiesVARJO malloc() { - return wrap(XrSystemMarkerTrackingPropertiesVARJO.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSystemMarkerTrackingPropertiesVARJO} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSystemMarkerTrackingPropertiesVARJO calloc() { - return wrap(XrSystemMarkerTrackingPropertiesVARJO.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSystemMarkerTrackingPropertiesVARJO} instance allocated with {@link BufferUtils}. */ - public static XrSystemMarkerTrackingPropertiesVARJO create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSystemMarkerTrackingPropertiesVARJO.class, memAddress(container), container); - } - - /** Returns a new {@code XrSystemMarkerTrackingPropertiesVARJO} instance for the specified memory address. */ - public static XrSystemMarkerTrackingPropertiesVARJO create(long address) { - return wrap(XrSystemMarkerTrackingPropertiesVARJO.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSystemMarkerTrackingPropertiesVARJO createSafe(long address) { - return address == NULL ? null : wrap(XrSystemMarkerTrackingPropertiesVARJO.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSystemMarkerTrackingPropertiesVARJO.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSystemMarkerTrackingPropertiesVARJO} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSystemMarkerTrackingPropertiesVARJO malloc(MemoryStack stack) { - return wrap(XrSystemMarkerTrackingPropertiesVARJO.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSystemMarkerTrackingPropertiesVARJO} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSystemMarkerTrackingPropertiesVARJO calloc(MemoryStack stack) { - return wrap(XrSystemMarkerTrackingPropertiesVARJO.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSystemMarkerTrackingPropertiesVARJO.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSystemMarkerTrackingPropertiesVARJO.NEXT); } - /** Unsafe version of {@link #supportsMarkerTracking}. */ - public static int nsupportsMarkerTracking(long struct) { return UNSAFE.getInt(null, struct + XrSystemMarkerTrackingPropertiesVARJO.SUPPORTSMARKERTRACKING); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSystemMarkerTrackingPropertiesVARJO.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSystemMarkerTrackingPropertiesVARJO.NEXT, value); } - /** Unsafe version of {@link #supportsMarkerTracking(boolean) supportsMarkerTracking}. */ - public static void nsupportsMarkerTracking(long struct, int value) { UNSAFE.putInt(null, struct + XrSystemMarkerTrackingPropertiesVARJO.SUPPORTSMARKERTRACKING, value); } - - // ----------------------------------- - - /** An array of {@link XrSystemMarkerTrackingPropertiesVARJO} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSystemMarkerTrackingPropertiesVARJO ELEMENT_FACTORY = XrSystemMarkerTrackingPropertiesVARJO.create(-1L); - - /** - * Creates a new {@code XrSystemMarkerTrackingPropertiesVARJO.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSystemMarkerTrackingPropertiesVARJO#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSystemMarkerTrackingPropertiesVARJO getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSystemMarkerTrackingPropertiesVARJO.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrSystemMarkerTrackingPropertiesVARJO.nnext(address()); } - /** @return the value of the {@code supportsMarkerTracking} field. */ - @NativeType("XrBool32") - public boolean supportsMarkerTracking() { return XrSystemMarkerTrackingPropertiesVARJO.nsupportsMarkerTracking(address()) != 0; } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSystemMarkerTrackingPropertiesVARJO.ntype(address(), value); return this; } - /** Sets the {@link VARJOMarkerTracking#XR_TYPE_SYSTEM_MARKER_TRACKING_PROPERTIES_VARJO TYPE_SYSTEM_MARKER_TRACKING_PROPERTIES_VARJO} value to the {@code type} field. */ - public Buffer type$Default() { return type(VARJOMarkerTracking.XR_TYPE_SYSTEM_MARKER_TRACKING_PROPERTIES_VARJO); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrSystemMarkerTrackingPropertiesVARJO.nnext(address(), value); return this; } - /** Sets the specified value to the {@code supportsMarkerTracking} field. */ - public Buffer supportsMarkerTracking(@NativeType("XrBool32") boolean value) { XrSystemMarkerTrackingPropertiesVARJO.nsupportsMarkerTracking(address(), value ? 1 : 0); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSystemPassthroughPropertiesFB.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSystemPassthroughPropertiesFB.java deleted file mode 100644 index 0aa55f88..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSystemPassthroughPropertiesFB.java +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSystemPassthroughPropertiesFB {
- *     XrStructureType type;
- *     void const * next;
- *     XrBool32 supportsPassthrough;
- * }
- */ -public class XrSystemPassthroughPropertiesFB extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - SUPPORTSPASSTHROUGH; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - SUPPORTSPASSTHROUGH = layout.offsetof(2); - } - - /** - * Creates a {@code XrSystemPassthroughPropertiesFB} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSystemPassthroughPropertiesFB(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code supportsPassthrough} field. */ - @NativeType("XrBool32") - public boolean supportsPassthrough() { return nsupportsPassthrough(address()) != 0; } - - /** Sets the specified value to the {@code type} field. */ - public XrSystemPassthroughPropertiesFB type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link FBPassthrough#XR_TYPE_SYSTEM_PASSTHROUGH_PROPERTIES_FB TYPE_SYSTEM_PASSTHROUGH_PROPERTIES_FB} value to the {@code type} field. */ - public XrSystemPassthroughPropertiesFB type$Default() { return type(FBPassthrough.XR_TYPE_SYSTEM_PASSTHROUGH_PROPERTIES_FB); } - /** Sets the specified value to the {@code next} field. */ - public XrSystemPassthroughPropertiesFB next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code supportsPassthrough} field. */ - public XrSystemPassthroughPropertiesFB supportsPassthrough(@NativeType("XrBool32") boolean value) { nsupportsPassthrough(address(), value ? 1 : 0); return this; } - - /** Initializes this struct with the specified values. */ - public XrSystemPassthroughPropertiesFB set( - int type, - long next, - boolean supportsPassthrough - ) { - type(type); - next(next); - supportsPassthrough(supportsPassthrough); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSystemPassthroughPropertiesFB set(XrSystemPassthroughPropertiesFB src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSystemPassthroughPropertiesFB} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSystemPassthroughPropertiesFB malloc() { - return wrap(XrSystemPassthroughPropertiesFB.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSystemPassthroughPropertiesFB} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSystemPassthroughPropertiesFB calloc() { - return wrap(XrSystemPassthroughPropertiesFB.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSystemPassthroughPropertiesFB} instance allocated with {@link BufferUtils}. */ - public static XrSystemPassthroughPropertiesFB create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSystemPassthroughPropertiesFB.class, memAddress(container), container); - } - - /** Returns a new {@code XrSystemPassthroughPropertiesFB} instance for the specified memory address. */ - public static XrSystemPassthroughPropertiesFB create(long address) { - return wrap(XrSystemPassthroughPropertiesFB.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSystemPassthroughPropertiesFB createSafe(long address) { - return address == NULL ? null : wrap(XrSystemPassthroughPropertiesFB.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSystemPassthroughPropertiesFB.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSystemPassthroughPropertiesFB} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSystemPassthroughPropertiesFB malloc(MemoryStack stack) { - return wrap(XrSystemPassthroughPropertiesFB.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSystemPassthroughPropertiesFB} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSystemPassthroughPropertiesFB calloc(MemoryStack stack) { - return wrap(XrSystemPassthroughPropertiesFB.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSystemPassthroughPropertiesFB.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSystemPassthroughPropertiesFB.NEXT); } - /** Unsafe version of {@link #supportsPassthrough}. */ - public static int nsupportsPassthrough(long struct) { return UNSAFE.getInt(null, struct + XrSystemPassthroughPropertiesFB.SUPPORTSPASSTHROUGH); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSystemPassthroughPropertiesFB.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSystemPassthroughPropertiesFB.NEXT, value); } - /** Unsafe version of {@link #supportsPassthrough(boolean) supportsPassthrough}. */ - public static void nsupportsPassthrough(long struct, int value) { UNSAFE.putInt(null, struct + XrSystemPassthroughPropertiesFB.SUPPORTSPASSTHROUGH, value); } - - // ----------------------------------- - - /** An array of {@link XrSystemPassthroughPropertiesFB} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSystemPassthroughPropertiesFB ELEMENT_FACTORY = XrSystemPassthroughPropertiesFB.create(-1L); - - /** - * Creates a new {@code XrSystemPassthroughPropertiesFB.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSystemPassthroughPropertiesFB#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSystemPassthroughPropertiesFB getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSystemPassthroughPropertiesFB.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrSystemPassthroughPropertiesFB.nnext(address()); } - /** @return the value of the {@code supportsPassthrough} field. */ - @NativeType("XrBool32") - public boolean supportsPassthrough() { return XrSystemPassthroughPropertiesFB.nsupportsPassthrough(address()) != 0; } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSystemPassthroughPropertiesFB.ntype(address(), value); return this; } - /** Sets the {@link FBPassthrough#XR_TYPE_SYSTEM_PASSTHROUGH_PROPERTIES_FB TYPE_SYSTEM_PASSTHROUGH_PROPERTIES_FB} value to the {@code type} field. */ - public Buffer type$Default() { return type(FBPassthrough.XR_TYPE_SYSTEM_PASSTHROUGH_PROPERTIES_FB); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrSystemPassthroughPropertiesFB.nnext(address(), value); return this; } - /** Sets the specified value to the {@code supportsPassthrough} field. */ - public Buffer supportsPassthrough(@NativeType("XrBool32") boolean value) { XrSystemPassthroughPropertiesFB.nsupportsPassthrough(address(), value ? 1 : 0); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSystemProperties.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSystemProperties.java deleted file mode 100644 index fa81eea7..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSystemProperties.java +++ /dev/null @@ -1,344 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.openxr.XR10.XR_MAX_SYSTEM_NAME_SIZE; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSystemProperties {
- *     XrStructureType type;
- *     void * next;
- *     XrSystemId systemId;
- *     uint32_t vendorId;
- *     char systemName[XR_MAX_SYSTEM_NAME_SIZE];
- *     {@link XrSystemGraphicsProperties XrSystemGraphicsProperties} graphicsProperties;
- *     {@link XrSystemTrackingProperties XrSystemTrackingProperties} trackingProperties;
- * }
- */ -public class XrSystemProperties extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - SYSTEMID, - VENDORID, - SYSTEMNAME, - GRAPHICSPROPERTIES, - TRACKINGPROPERTIES; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(8), - __member(4), - __array(1, XR_MAX_SYSTEM_NAME_SIZE), - __member(XrSystemGraphicsProperties.SIZEOF, XrSystemGraphicsProperties.ALIGNOF), - __member(XrSystemTrackingProperties.SIZEOF, XrSystemTrackingProperties.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - SYSTEMID = layout.offsetof(2); - VENDORID = layout.offsetof(3); - SYSTEMNAME = layout.offsetof(4); - GRAPHICSPROPERTIES = layout.offsetof(5); - TRACKINGPROPERTIES = layout.offsetof(6); - } - - /** - * Creates a {@code XrSystemProperties} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSystemProperties(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return the value of the {@code systemId} field. */ - @NativeType("XrSystemId") - public long systemId() { return nsystemId(address()); } - /** @return the value of the {@code vendorId} field. */ - @NativeType("uint32_t") - public int vendorId() { return nvendorId(address()); } - /** @return a {@link ByteBuffer} view of the {@code systemName} field. */ - @NativeType("char[XR_MAX_SYSTEM_NAME_SIZE]") - public ByteBuffer systemName() { return nsystemName(address()); } - /** @return the null-terminated string stored in the {@code systemName} field. */ - @NativeType("char[XR_MAX_SYSTEM_NAME_SIZE]") - public String systemNameString() { return nsystemNameString(address()); } - /** @return a {@link XrSystemGraphicsProperties} view of the {@code graphicsProperties} field. */ - public XrSystemGraphicsProperties graphicsProperties() { return ngraphicsProperties(address()); } - /** @return a {@link XrSystemTrackingProperties} view of the {@code trackingProperties} field. */ - public XrSystemTrackingProperties trackingProperties() { return ntrackingProperties(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrSystemProperties type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_SYSTEM_PROPERTIES TYPE_SYSTEM_PROPERTIES} value to the {@code type} field. */ - public XrSystemProperties type$Default() { return type(XR10.XR_TYPE_SYSTEM_PROPERTIES); } - /** Sets the specified value to the {@code next} field. */ - public XrSystemProperties next(@NativeType("void *") long value) { nnext(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrSystemProperties set( - int type, - long next - ) { - type(type); - next(next); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSystemProperties set(XrSystemProperties src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSystemProperties} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSystemProperties malloc() { - return wrap(XrSystemProperties.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSystemProperties} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSystemProperties calloc() { - return wrap(XrSystemProperties.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSystemProperties} instance allocated with {@link BufferUtils}. */ - public static XrSystemProperties create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSystemProperties.class, memAddress(container), container); - } - - /** Returns a new {@code XrSystemProperties} instance for the specified memory address. */ - public static XrSystemProperties create(long address) { - return wrap(XrSystemProperties.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSystemProperties createSafe(long address) { - return address == NULL ? null : wrap(XrSystemProperties.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSystemProperties.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSystemProperties} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSystemProperties malloc(MemoryStack stack) { - return wrap(XrSystemProperties.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSystemProperties} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSystemProperties calloc(MemoryStack stack) { - return wrap(XrSystemProperties.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSystemProperties.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSystemProperties.NEXT); } - /** Unsafe version of {@link #systemId}. */ - public static long nsystemId(long struct) { return UNSAFE.getLong(null, struct + XrSystemProperties.SYSTEMID); } - /** Unsafe version of {@link #vendorId}. */ - public static int nvendorId(long struct) { return UNSAFE.getInt(null, struct + XrSystemProperties.VENDORID); } - /** Unsafe version of {@link #systemName}. */ - public static ByteBuffer nsystemName(long struct) { return memByteBuffer(struct + XrSystemProperties.SYSTEMNAME, XR_MAX_SYSTEM_NAME_SIZE); } - /** Unsafe version of {@link #systemNameString}. */ - public static String nsystemNameString(long struct) { return memUTF8(struct + XrSystemProperties.SYSTEMNAME); } - /** Unsafe version of {@link #graphicsProperties}. */ - public static XrSystemGraphicsProperties ngraphicsProperties(long struct) { return XrSystemGraphicsProperties.create(struct + XrSystemProperties.GRAPHICSPROPERTIES); } - /** Unsafe version of {@link #trackingProperties}. */ - public static XrSystemTrackingProperties ntrackingProperties(long struct) { return XrSystemTrackingProperties.create(struct + XrSystemProperties.TRACKINGPROPERTIES); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSystemProperties.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSystemProperties.NEXT, value); } - - // ----------------------------------- - - /** An array of {@link XrSystemProperties} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSystemProperties ELEMENT_FACTORY = XrSystemProperties.create(-1L); - - /** - * Creates a new {@code XrSystemProperties.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSystemProperties#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSystemProperties getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSystemProperties.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrSystemProperties.nnext(address()); } - /** @return the value of the {@code systemId} field. */ - @NativeType("XrSystemId") - public long systemId() { return XrSystemProperties.nsystemId(address()); } - /** @return the value of the {@code vendorId} field. */ - @NativeType("uint32_t") - public int vendorId() { return XrSystemProperties.nvendorId(address()); } - /** @return a {@link ByteBuffer} view of the {@code systemName} field. */ - @NativeType("char[XR_MAX_SYSTEM_NAME_SIZE]") - public ByteBuffer systemName() { return XrSystemProperties.nsystemName(address()); } - /** @return the null-terminated string stored in the {@code systemName} field. */ - @NativeType("char[XR_MAX_SYSTEM_NAME_SIZE]") - public String systemNameString() { return XrSystemProperties.nsystemNameString(address()); } - /** @return a {@link XrSystemGraphicsProperties} view of the {@code graphicsProperties} field. */ - public XrSystemGraphicsProperties graphicsProperties() { return XrSystemProperties.ngraphicsProperties(address()); } - /** @return a {@link XrSystemTrackingProperties} view of the {@code trackingProperties} field. */ - public XrSystemTrackingProperties trackingProperties() { return XrSystemProperties.ntrackingProperties(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSystemProperties.ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_SYSTEM_PROPERTIES TYPE_SYSTEM_PROPERTIES} value to the {@code type} field. */ - public Buffer type$Default() { return type(XR10.XR_TYPE_SYSTEM_PROPERTIES); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrSystemProperties.nnext(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSystemSpaceWarpPropertiesFB.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSystemSpaceWarpPropertiesFB.java deleted file mode 100644 index 1efa3999..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSystemSpaceWarpPropertiesFB.java +++ /dev/null @@ -1,319 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSystemSpaceWarpPropertiesFB {
- *     XrStructureType type;
- *     void * next;
- *     uint32_t recommendedMotionVectorImageRectWidth;
- *     uint32_t recommendedMotionVectorImageRectHeight;
- * }
- */ -public class XrSystemSpaceWarpPropertiesFB extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - RECOMMENDEDMOTIONVECTORIMAGERECTWIDTH, - RECOMMENDEDMOTIONVECTORIMAGERECTHEIGHT; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - RECOMMENDEDMOTIONVECTORIMAGERECTWIDTH = layout.offsetof(2); - RECOMMENDEDMOTIONVECTORIMAGERECTHEIGHT = layout.offsetof(3); - } - - /** - * Creates a {@code XrSystemSpaceWarpPropertiesFB} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSystemSpaceWarpPropertiesFB(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return the value of the {@code recommendedMotionVectorImageRectWidth} field. */ - @NativeType("uint32_t") - public int recommendedMotionVectorImageRectWidth() { return nrecommendedMotionVectorImageRectWidth(address()); } - /** @return the value of the {@code recommendedMotionVectorImageRectHeight} field. */ - @NativeType("uint32_t") - public int recommendedMotionVectorImageRectHeight() { return nrecommendedMotionVectorImageRectHeight(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrSystemSpaceWarpPropertiesFB type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link FBSpaceWarp#XR_TYPE_SYSTEM_SPACE_WARP_PROPERTIES_FB TYPE_SYSTEM_SPACE_WARP_PROPERTIES_FB} value to the {@code type} field. */ - public XrSystemSpaceWarpPropertiesFB type$Default() { return type(FBSpaceWarp.XR_TYPE_SYSTEM_SPACE_WARP_PROPERTIES_FB); } - /** Sets the specified value to the {@code next} field. */ - public XrSystemSpaceWarpPropertiesFB next(@NativeType("void *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code recommendedMotionVectorImageRectWidth} field. */ - public XrSystemSpaceWarpPropertiesFB recommendedMotionVectorImageRectWidth(@NativeType("uint32_t") int value) { nrecommendedMotionVectorImageRectWidth(address(), value); return this; } - /** Sets the specified value to the {@code recommendedMotionVectorImageRectHeight} field. */ - public XrSystemSpaceWarpPropertiesFB recommendedMotionVectorImageRectHeight(@NativeType("uint32_t") int value) { nrecommendedMotionVectorImageRectHeight(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrSystemSpaceWarpPropertiesFB set( - int type, - long next, - int recommendedMotionVectorImageRectWidth, - int recommendedMotionVectorImageRectHeight - ) { - type(type); - next(next); - recommendedMotionVectorImageRectWidth(recommendedMotionVectorImageRectWidth); - recommendedMotionVectorImageRectHeight(recommendedMotionVectorImageRectHeight); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSystemSpaceWarpPropertiesFB set(XrSystemSpaceWarpPropertiesFB src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSystemSpaceWarpPropertiesFB} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSystemSpaceWarpPropertiesFB malloc() { - return wrap(XrSystemSpaceWarpPropertiesFB.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSystemSpaceWarpPropertiesFB} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSystemSpaceWarpPropertiesFB calloc() { - return wrap(XrSystemSpaceWarpPropertiesFB.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSystemSpaceWarpPropertiesFB} instance allocated with {@link BufferUtils}. */ - public static XrSystemSpaceWarpPropertiesFB create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSystemSpaceWarpPropertiesFB.class, memAddress(container), container); - } - - /** Returns a new {@code XrSystemSpaceWarpPropertiesFB} instance for the specified memory address. */ - public static XrSystemSpaceWarpPropertiesFB create(long address) { - return wrap(XrSystemSpaceWarpPropertiesFB.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSystemSpaceWarpPropertiesFB createSafe(long address) { - return address == NULL ? null : wrap(XrSystemSpaceWarpPropertiesFB.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSystemSpaceWarpPropertiesFB.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSystemSpaceWarpPropertiesFB} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSystemSpaceWarpPropertiesFB malloc(MemoryStack stack) { - return wrap(XrSystemSpaceWarpPropertiesFB.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSystemSpaceWarpPropertiesFB} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSystemSpaceWarpPropertiesFB calloc(MemoryStack stack) { - return wrap(XrSystemSpaceWarpPropertiesFB.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrSystemSpaceWarpPropertiesFB.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrSystemSpaceWarpPropertiesFB.NEXT); } - /** Unsafe version of {@link #recommendedMotionVectorImageRectWidth}. */ - public static int nrecommendedMotionVectorImageRectWidth(long struct) { return UNSAFE.getInt(null, struct + XrSystemSpaceWarpPropertiesFB.RECOMMENDEDMOTIONVECTORIMAGERECTWIDTH); } - /** Unsafe version of {@link #recommendedMotionVectorImageRectHeight}. */ - public static int nrecommendedMotionVectorImageRectHeight(long struct) { return UNSAFE.getInt(null, struct + XrSystemSpaceWarpPropertiesFB.RECOMMENDEDMOTIONVECTORIMAGERECTHEIGHT); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrSystemSpaceWarpPropertiesFB.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrSystemSpaceWarpPropertiesFB.NEXT, value); } - /** Unsafe version of {@link #recommendedMotionVectorImageRectWidth(int) recommendedMotionVectorImageRectWidth}. */ - public static void nrecommendedMotionVectorImageRectWidth(long struct, int value) { UNSAFE.putInt(null, struct + XrSystemSpaceWarpPropertiesFB.RECOMMENDEDMOTIONVECTORIMAGERECTWIDTH, value); } - /** Unsafe version of {@link #recommendedMotionVectorImageRectHeight(int) recommendedMotionVectorImageRectHeight}. */ - public static void nrecommendedMotionVectorImageRectHeight(long struct, int value) { UNSAFE.putInt(null, struct + XrSystemSpaceWarpPropertiesFB.RECOMMENDEDMOTIONVECTORIMAGERECTHEIGHT, value); } - - // ----------------------------------- - - /** An array of {@link XrSystemSpaceWarpPropertiesFB} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSystemSpaceWarpPropertiesFB ELEMENT_FACTORY = XrSystemSpaceWarpPropertiesFB.create(-1L); - - /** - * Creates a new {@code XrSystemSpaceWarpPropertiesFB.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSystemSpaceWarpPropertiesFB#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSystemSpaceWarpPropertiesFB getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrSystemSpaceWarpPropertiesFB.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrSystemSpaceWarpPropertiesFB.nnext(address()); } - /** @return the value of the {@code recommendedMotionVectorImageRectWidth} field. */ - @NativeType("uint32_t") - public int recommendedMotionVectorImageRectWidth() { return XrSystemSpaceWarpPropertiesFB.nrecommendedMotionVectorImageRectWidth(address()); } - /** @return the value of the {@code recommendedMotionVectorImageRectHeight} field. */ - @NativeType("uint32_t") - public int recommendedMotionVectorImageRectHeight() { return XrSystemSpaceWarpPropertiesFB.nrecommendedMotionVectorImageRectHeight(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrSystemSpaceWarpPropertiesFB.ntype(address(), value); return this; } - /** Sets the {@link FBSpaceWarp#XR_TYPE_SYSTEM_SPACE_WARP_PROPERTIES_FB TYPE_SYSTEM_SPACE_WARP_PROPERTIES_FB} value to the {@code type} field. */ - public Buffer type$Default() { return type(FBSpaceWarp.XR_TYPE_SYSTEM_SPACE_WARP_PROPERTIES_FB); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrSystemSpaceWarpPropertiesFB.nnext(address(), value); return this; } - /** Sets the specified value to the {@code recommendedMotionVectorImageRectWidth} field. */ - public Buffer recommendedMotionVectorImageRectWidth(@NativeType("uint32_t") int value) { XrSystemSpaceWarpPropertiesFB.nrecommendedMotionVectorImageRectWidth(address(), value); return this; } - /** Sets the specified value to the {@code recommendedMotionVectorImageRectHeight} field. */ - public Buffer recommendedMotionVectorImageRectHeight(@NativeType("uint32_t") int value) { XrSystemSpaceWarpPropertiesFB.nrecommendedMotionVectorImageRectHeight(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSystemTrackingProperties.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrSystemTrackingProperties.java deleted file mode 100644 index 1cd0899c..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrSystemTrackingProperties.java +++ /dev/null @@ -1,275 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrSystemTrackingProperties {
- *     XrBool32 orientationTracking;
- *     XrBool32 positionTracking;
- * }
- */ -public class XrSystemTrackingProperties extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - ORIENTATIONTRACKING, - POSITIONTRACKING; - - static { - Layout layout = __struct( - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - ORIENTATIONTRACKING = layout.offsetof(0); - POSITIONTRACKING = layout.offsetof(1); - } - - /** - * Creates a {@code XrSystemTrackingProperties} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrSystemTrackingProperties(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code orientationTracking} field. */ - @NativeType("XrBool32") - public boolean orientationTracking() { return norientationTracking(address()) != 0; } - /** @return the value of the {@code positionTracking} field. */ - @NativeType("XrBool32") - public boolean positionTracking() { return npositionTracking(address()) != 0; } - - /** Sets the specified value to the {@code orientationTracking} field. */ - public XrSystemTrackingProperties orientationTracking(@NativeType("XrBool32") boolean value) { norientationTracking(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@code positionTracking} field. */ - public XrSystemTrackingProperties positionTracking(@NativeType("XrBool32") boolean value) { npositionTracking(address(), value ? 1 : 0); return this; } - - /** Initializes this struct with the specified values. */ - public XrSystemTrackingProperties set( - boolean orientationTracking, - boolean positionTracking - ) { - orientationTracking(orientationTracking); - positionTracking(positionTracking); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrSystemTrackingProperties set(XrSystemTrackingProperties src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrSystemTrackingProperties} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrSystemTrackingProperties malloc() { - return wrap(XrSystemTrackingProperties.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrSystemTrackingProperties} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrSystemTrackingProperties calloc() { - return wrap(XrSystemTrackingProperties.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrSystemTrackingProperties} instance allocated with {@link BufferUtils}. */ - public static XrSystemTrackingProperties create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrSystemTrackingProperties.class, memAddress(container), container); - } - - /** Returns a new {@code XrSystemTrackingProperties} instance for the specified memory address. */ - public static XrSystemTrackingProperties create(long address) { - return wrap(XrSystemTrackingProperties.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSystemTrackingProperties createSafe(long address) { - return address == NULL ? null : wrap(XrSystemTrackingProperties.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrSystemTrackingProperties.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrSystemTrackingProperties} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrSystemTrackingProperties malloc(MemoryStack stack) { - return wrap(XrSystemTrackingProperties.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrSystemTrackingProperties} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrSystemTrackingProperties calloc(MemoryStack stack) { - return wrap(XrSystemTrackingProperties.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #orientationTracking}. */ - public static int norientationTracking(long struct) { return UNSAFE.getInt(null, struct + XrSystemTrackingProperties.ORIENTATIONTRACKING); } - /** Unsafe version of {@link #positionTracking}. */ - public static int npositionTracking(long struct) { return UNSAFE.getInt(null, struct + XrSystemTrackingProperties.POSITIONTRACKING); } - - /** Unsafe version of {@link #orientationTracking(boolean) orientationTracking}. */ - public static void norientationTracking(long struct, int value) { UNSAFE.putInt(null, struct + XrSystemTrackingProperties.ORIENTATIONTRACKING, value); } - /** Unsafe version of {@link #positionTracking(boolean) positionTracking}. */ - public static void npositionTracking(long struct, int value) { UNSAFE.putInt(null, struct + XrSystemTrackingProperties.POSITIONTRACKING, value); } - - // ----------------------------------- - - /** An array of {@link XrSystemTrackingProperties} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrSystemTrackingProperties ELEMENT_FACTORY = XrSystemTrackingProperties.create(-1L); - - /** - * Creates a new {@code XrSystemTrackingProperties.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrSystemTrackingProperties#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrSystemTrackingProperties getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code orientationTracking} field. */ - @NativeType("XrBool32") - public boolean orientationTracking() { return XrSystemTrackingProperties.norientationTracking(address()) != 0; } - /** @return the value of the {@code positionTracking} field. */ - @NativeType("XrBool32") - public boolean positionTracking() { return XrSystemTrackingProperties.npositionTracking(address()) != 0; } - - /** Sets the specified value to the {@code orientationTracking} field. */ - public Buffer orientationTracking(@NativeType("XrBool32") boolean value) { XrSystemTrackingProperties.norientationTracking(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@code positionTracking} field. */ - public Buffer positionTracking(@NativeType("XrBool32") boolean value) { XrSystemTrackingProperties.npositionTracking(address(), value ? 1 : 0); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrTriangleMeshCreateInfoFB.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrTriangleMeshCreateInfoFB.java deleted file mode 100644 index bea228da..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrTriangleMeshCreateInfoFB.java +++ /dev/null @@ -1,412 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; -import java.nio.IntBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrTriangleMeshCreateInfoFB {
- *     XrStructureType type;
- *     void const * next;
- *     XrTriangleMeshFlagsFB flags;
- *     XrWindingOrderFB windingOrder;
- *     uint32_t vertexCount;
- *     {@link XrVector3f XrVector3f} const * vertexBuffer;
- *     uint32_t triangleCount;
- *     uint32_t const * indexBuffer;
- * }
- */ -public class XrTriangleMeshCreateInfoFB extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - FLAGS, - WINDINGORDER, - VERTEXCOUNT, - VERTEXBUFFER, - TRIANGLECOUNT, - INDEXBUFFER; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(8), - __member(4), - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - FLAGS = layout.offsetof(2); - WINDINGORDER = layout.offsetof(3); - VERTEXCOUNT = layout.offsetof(4); - VERTEXBUFFER = layout.offsetof(5); - TRIANGLECOUNT = layout.offsetof(6); - INDEXBUFFER = layout.offsetof(7); - } - - /** - * Creates a {@code XrTriangleMeshCreateInfoFB} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrTriangleMeshCreateInfoFB(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code flags} field. */ - @NativeType("XrTriangleMeshFlagsFB") - public long flags() { return nflags(address()); } - /** @return the value of the {@code windingOrder} field. */ - @NativeType("XrWindingOrderFB") - public int windingOrder() { return nwindingOrder(address()); } - /** @return the value of the {@code vertexCount} field. */ - @NativeType("uint32_t") - public int vertexCount() { return nvertexCount(address()); } - /** @return a {@link XrVector3f} view of the struct pointed to by the {@code vertexBuffer} field. */ - @Nullable - @NativeType("XrVector3f const *") - public XrVector3f vertexBuffer() { return nvertexBuffer(address()); } - /** @return the value of the {@code triangleCount} field. */ - @NativeType("uint32_t") - public int triangleCount() { return ntriangleCount(address()); } - /** - * @return a {@link IntBuffer} view of the data pointed to by the {@code indexBuffer} field. - * - * @param capacity the number of elements in the returned buffer - */ - @Nullable - @NativeType("uint32_t const *") - public IntBuffer indexBuffer(int capacity) { return nindexBuffer(address(), capacity); } - - /** Sets the specified value to the {@code type} field. */ - public XrTriangleMeshCreateInfoFB type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link FBTriangleMesh#XR_TYPE_TRIANGLE_MESH_CREATE_INFO_FB TYPE_TRIANGLE_MESH_CREATE_INFO_FB} value to the {@code type} field. */ - public XrTriangleMeshCreateInfoFB type$Default() { return type(FBTriangleMesh.XR_TYPE_TRIANGLE_MESH_CREATE_INFO_FB); } - /** Sets the specified value to the {@code next} field. */ - public XrTriangleMeshCreateInfoFB next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code flags} field. */ - public XrTriangleMeshCreateInfoFB flags(@NativeType("XrTriangleMeshFlagsFB") long value) { nflags(address(), value); return this; } - /** Sets the specified value to the {@code windingOrder} field. */ - public XrTriangleMeshCreateInfoFB windingOrder(@NativeType("XrWindingOrderFB") int value) { nwindingOrder(address(), value); return this; } - /** Sets the specified value to the {@code vertexCount} field. */ - public XrTriangleMeshCreateInfoFB vertexCount(@NativeType("uint32_t") int value) { nvertexCount(address(), value); return this; } - /** Sets the address of the specified {@link XrVector3f} to the {@code vertexBuffer} field. */ - public XrTriangleMeshCreateInfoFB vertexBuffer(@Nullable @NativeType("XrVector3f const *") XrVector3f value) { nvertexBuffer(address(), value); return this; } - /** Sets the specified value to the {@code triangleCount} field. */ - public XrTriangleMeshCreateInfoFB triangleCount(@NativeType("uint32_t") int value) { ntriangleCount(address(), value); return this; } - /** Sets the address of the specified {@link IntBuffer} to the {@code indexBuffer} field. */ - public XrTriangleMeshCreateInfoFB indexBuffer(@Nullable @NativeType("uint32_t const *") IntBuffer value) { nindexBuffer(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrTriangleMeshCreateInfoFB set( - int type, - long next, - long flags, - int windingOrder, - int vertexCount, - @Nullable XrVector3f vertexBuffer, - int triangleCount, - @Nullable IntBuffer indexBuffer - ) { - type(type); - next(next); - flags(flags); - windingOrder(windingOrder); - vertexCount(vertexCount); - vertexBuffer(vertexBuffer); - triangleCount(triangleCount); - indexBuffer(indexBuffer); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrTriangleMeshCreateInfoFB set(XrTriangleMeshCreateInfoFB src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrTriangleMeshCreateInfoFB} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrTriangleMeshCreateInfoFB malloc() { - return wrap(XrTriangleMeshCreateInfoFB.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrTriangleMeshCreateInfoFB} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrTriangleMeshCreateInfoFB calloc() { - return wrap(XrTriangleMeshCreateInfoFB.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrTriangleMeshCreateInfoFB} instance allocated with {@link BufferUtils}. */ - public static XrTriangleMeshCreateInfoFB create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrTriangleMeshCreateInfoFB.class, memAddress(container), container); - } - - /** Returns a new {@code XrTriangleMeshCreateInfoFB} instance for the specified memory address. */ - public static XrTriangleMeshCreateInfoFB create(long address) { - return wrap(XrTriangleMeshCreateInfoFB.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrTriangleMeshCreateInfoFB createSafe(long address) { - return address == NULL ? null : wrap(XrTriangleMeshCreateInfoFB.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrTriangleMeshCreateInfoFB.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrTriangleMeshCreateInfoFB} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrTriangleMeshCreateInfoFB malloc(MemoryStack stack) { - return wrap(XrTriangleMeshCreateInfoFB.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrTriangleMeshCreateInfoFB} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrTriangleMeshCreateInfoFB calloc(MemoryStack stack) { - return wrap(XrTriangleMeshCreateInfoFB.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrTriangleMeshCreateInfoFB.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrTriangleMeshCreateInfoFB.NEXT); } - /** Unsafe version of {@link #flags}. */ - public static long nflags(long struct) { return UNSAFE.getLong(null, struct + XrTriangleMeshCreateInfoFB.FLAGS); } - /** Unsafe version of {@link #windingOrder}. */ - public static int nwindingOrder(long struct) { return UNSAFE.getInt(null, struct + XrTriangleMeshCreateInfoFB.WINDINGORDER); } - /** Unsafe version of {@link #vertexCount}. */ - public static int nvertexCount(long struct) { return UNSAFE.getInt(null, struct + XrTriangleMeshCreateInfoFB.VERTEXCOUNT); } - /** Unsafe version of {@link #vertexBuffer}. */ - @Nullable public static XrVector3f nvertexBuffer(long struct) { return XrVector3f.createSafe(memGetAddress(struct + XrTriangleMeshCreateInfoFB.VERTEXBUFFER)); } - /** Unsafe version of {@link #triangleCount}. */ - public static int ntriangleCount(long struct) { return UNSAFE.getInt(null, struct + XrTriangleMeshCreateInfoFB.TRIANGLECOUNT); } - /** Unsafe version of {@link #indexBuffer(int) indexBuffer}. */ - @Nullable public static IntBuffer nindexBuffer(long struct, int capacity) { return memIntBufferSafe(memGetAddress(struct + XrTriangleMeshCreateInfoFB.INDEXBUFFER), capacity); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrTriangleMeshCreateInfoFB.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrTriangleMeshCreateInfoFB.NEXT, value); } - /** Unsafe version of {@link #flags(long) flags}. */ - public static void nflags(long struct, long value) { UNSAFE.putLong(null, struct + XrTriangleMeshCreateInfoFB.FLAGS, value); } - /** Unsafe version of {@link #windingOrder(int) windingOrder}. */ - public static void nwindingOrder(long struct, int value) { UNSAFE.putInt(null, struct + XrTriangleMeshCreateInfoFB.WINDINGORDER, value); } - /** Unsafe version of {@link #vertexCount(int) vertexCount}. */ - public static void nvertexCount(long struct, int value) { UNSAFE.putInt(null, struct + XrTriangleMeshCreateInfoFB.VERTEXCOUNT, value); } - /** Unsafe version of {@link #vertexBuffer(XrVector3f) vertexBuffer}. */ - public static void nvertexBuffer(long struct, @Nullable XrVector3f value) { memPutAddress(struct + XrTriangleMeshCreateInfoFB.VERTEXBUFFER, memAddressSafe(value)); } - /** Unsafe version of {@link #triangleCount(int) triangleCount}. */ - public static void ntriangleCount(long struct, int value) { UNSAFE.putInt(null, struct + XrTriangleMeshCreateInfoFB.TRIANGLECOUNT, value); } - /** Unsafe version of {@link #indexBuffer(IntBuffer) indexBuffer}. */ - public static void nindexBuffer(long struct, @Nullable IntBuffer value) { memPutAddress(struct + XrTriangleMeshCreateInfoFB.INDEXBUFFER, memAddressSafe(value)); } - - // ----------------------------------- - - /** An array of {@link XrTriangleMeshCreateInfoFB} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrTriangleMeshCreateInfoFB ELEMENT_FACTORY = XrTriangleMeshCreateInfoFB.create(-1L); - - /** - * Creates a new {@code XrTriangleMeshCreateInfoFB.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrTriangleMeshCreateInfoFB#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrTriangleMeshCreateInfoFB getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrTriangleMeshCreateInfoFB.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrTriangleMeshCreateInfoFB.nnext(address()); } - /** @return the value of the {@code flags} field. */ - @NativeType("XrTriangleMeshFlagsFB") - public long flags() { return XrTriangleMeshCreateInfoFB.nflags(address()); } - /** @return the value of the {@code windingOrder} field. */ - @NativeType("XrWindingOrderFB") - public int windingOrder() { return XrTriangleMeshCreateInfoFB.nwindingOrder(address()); } - /** @return the value of the {@code vertexCount} field. */ - @NativeType("uint32_t") - public int vertexCount() { return XrTriangleMeshCreateInfoFB.nvertexCount(address()); } - /** @return a {@link XrVector3f} view of the struct pointed to by the {@code vertexBuffer} field. */ - @Nullable - @NativeType("XrVector3f const *") - public XrVector3f vertexBuffer() { return XrTriangleMeshCreateInfoFB.nvertexBuffer(address()); } - /** @return the value of the {@code triangleCount} field. */ - @NativeType("uint32_t") - public int triangleCount() { return XrTriangleMeshCreateInfoFB.ntriangleCount(address()); } - /** - * @return a {@link IntBuffer} view of the data pointed to by the {@code indexBuffer} field. - * - * @param capacity the number of elements in the returned buffer - */ - @Nullable - @NativeType("uint32_t const *") - public IntBuffer indexBuffer(int capacity) { return XrTriangleMeshCreateInfoFB.nindexBuffer(address(), capacity); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrTriangleMeshCreateInfoFB.ntype(address(), value); return this; } - /** Sets the {@link FBTriangleMesh#XR_TYPE_TRIANGLE_MESH_CREATE_INFO_FB TYPE_TRIANGLE_MESH_CREATE_INFO_FB} value to the {@code type} field. */ - public Buffer type$Default() { return type(FBTriangleMesh.XR_TYPE_TRIANGLE_MESH_CREATE_INFO_FB); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrTriangleMeshCreateInfoFB.nnext(address(), value); return this; } - /** Sets the specified value to the {@code flags} field. */ - public Buffer flags(@NativeType("XrTriangleMeshFlagsFB") long value) { XrTriangleMeshCreateInfoFB.nflags(address(), value); return this; } - /** Sets the specified value to the {@code windingOrder} field. */ - public Buffer windingOrder(@NativeType("XrWindingOrderFB") int value) { XrTriangleMeshCreateInfoFB.nwindingOrder(address(), value); return this; } - /** Sets the specified value to the {@code vertexCount} field. */ - public Buffer vertexCount(@NativeType("uint32_t") int value) { XrTriangleMeshCreateInfoFB.nvertexCount(address(), value); return this; } - /** Sets the address of the specified {@link XrVector3f} to the {@code vertexBuffer} field. */ - public Buffer vertexBuffer(@Nullable @NativeType("XrVector3f const *") XrVector3f value) { XrTriangleMeshCreateInfoFB.nvertexBuffer(address(), value); return this; } - /** Sets the specified value to the {@code triangleCount} field. */ - public Buffer triangleCount(@NativeType("uint32_t") int value) { XrTriangleMeshCreateInfoFB.ntriangleCount(address(), value); return this; } - /** Sets the address of the specified {@link IntBuffer} to the {@code indexBuffer} field. */ - public Buffer indexBuffer(@Nullable @NativeType("uint32_t const *") IntBuffer value) { XrTriangleMeshCreateInfoFB.nindexBuffer(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrTriangleMeshFB.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrTriangleMeshFB.java deleted file mode 100644 index a633cda3..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrTriangleMeshFB.java +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.openxr; - -public class XrTriangleMeshFB extends DispatchableHandle { - public XrTriangleMeshFB(long handle, DispatchableHandle session) { - super(handle, session.getCapabilities()); - } - - public XrTriangleMeshFB(long handle, XRCapabilities capabilities) { - super(handle, capabilities); - } -} diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrUuidMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrUuidMSFT.java deleted file mode 100644 index e10eac77..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrUuidMSFT.java +++ /dev/null @@ -1,268 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrUuidMSFT {
- *     uint8_t bytes[16];
- * }
- */ -public class XrUuidMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - BYTES; - - static { - Layout layout = __struct( - __array(1, 16) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - BYTES = layout.offsetof(0); - } - - /** - * Creates a {@code XrUuidMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrUuidMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return a {@link ByteBuffer} view of the {@code bytes} field. */ - @NativeType("uint8_t[16]") - public ByteBuffer bytes() { return nbytes(address()); } - /** @return the value at the specified index of the {@code bytes} field. */ - @NativeType("uint8_t") - public byte bytes(int index) { return nbytes(address(), index); } - - /** Copies the specified {@link ByteBuffer} to the {@code bytes} field. */ - public XrUuidMSFT bytes(@NativeType("uint8_t[16]") ByteBuffer value) { nbytes(address(), value); return this; } - /** Sets the specified value at the specified index of the {@code bytes} field. */ - public XrUuidMSFT bytes(int index, @NativeType("uint8_t") byte value) { nbytes(address(), index, value); return this; } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrUuidMSFT set(XrUuidMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrUuidMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrUuidMSFT malloc() { - return wrap(XrUuidMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrUuidMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrUuidMSFT calloc() { - return wrap(XrUuidMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrUuidMSFT} instance allocated with {@link BufferUtils}. */ - public static XrUuidMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrUuidMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrUuidMSFT} instance for the specified memory address. */ - public static XrUuidMSFT create(long address) { - return wrap(XrUuidMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrUuidMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrUuidMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrUuidMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrUuidMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrUuidMSFT malloc(MemoryStack stack) { - return wrap(XrUuidMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrUuidMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrUuidMSFT calloc(MemoryStack stack) { - return wrap(XrUuidMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #bytes}. */ - public static ByteBuffer nbytes(long struct) { return memByteBuffer(struct + XrUuidMSFT.BYTES, 16); } - /** Unsafe version of {@link #bytes(int) bytes}. */ - public static byte nbytes(long struct, int index) { - return UNSAFE.getByte(null, struct + XrUuidMSFT.BYTES + check(index, 16) * 1); - } - - /** Unsafe version of {@link #bytes(ByteBuffer) bytes}. */ - public static void nbytes(long struct, ByteBuffer value) { - if (CHECKS) { checkGT(value, 16); } - memCopy(memAddress(value), struct + XrUuidMSFT.BYTES, value.remaining() * 1); - } - /** Unsafe version of {@link #bytes(int, byte) bytes}. */ - public static void nbytes(long struct, int index, byte value) { - UNSAFE.putByte(null, struct + XrUuidMSFT.BYTES + check(index, 16) * 1, value); - } - - // ----------------------------------- - - /** An array of {@link XrUuidMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrUuidMSFT ELEMENT_FACTORY = XrUuidMSFT.create(-1L); - - /** - * Creates a new {@code XrUuidMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrUuidMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrUuidMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link ByteBuffer} view of the {@code bytes} field. */ - @NativeType("uint8_t[16]") - public ByteBuffer bytes() { return XrUuidMSFT.nbytes(address()); } - /** @return the value at the specified index of the {@code bytes} field. */ - @NativeType("uint8_t") - public byte bytes(int index) { return XrUuidMSFT.nbytes(address(), index); } - - /** Copies the specified {@link ByteBuffer} to the {@code bytes} field. */ - public Buffer bytes(@NativeType("uint8_t[16]") ByteBuffer value) { XrUuidMSFT.nbytes(address(), value); return this; } - /** Sets the specified value at the specified index of the {@code bytes} field. */ - public Buffer bytes(int index, @NativeType("uint8_t") byte value) { XrUuidMSFT.nbytes(address(), index, value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrVector2f.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrVector2f.java deleted file mode 100644 index 0060f27b..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrVector2f.java +++ /dev/null @@ -1,271 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrVector2f {
- *     float x;
- *     float y;
- * }
- */ -public class XrVector2f extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - X, - Y; - - static { - Layout layout = __struct( - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - X = layout.offsetof(0); - Y = layout.offsetof(1); - } - - /** - * Creates a {@code XrVector2f} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrVector2f(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code x} field. */ - public float x() { return nx(address()); } - /** @return the value of the {@code y} field. */ - public float y() { return ny(address()); } - - /** Sets the specified value to the {@code x} field. */ - public XrVector2f x(float value) { nx(address(), value); return this; } - /** Sets the specified value to the {@code y} field. */ - public XrVector2f y(float value) { ny(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrVector2f set( - float x, - float y - ) { - x(x); - y(y); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrVector2f set(XrVector2f src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrVector2f} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrVector2f malloc() { - return wrap(XrVector2f.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrVector2f} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrVector2f calloc() { - return wrap(XrVector2f.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrVector2f} instance allocated with {@link BufferUtils}. */ - public static XrVector2f create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrVector2f.class, memAddress(container), container); - } - - /** Returns a new {@code XrVector2f} instance for the specified memory address. */ - public static XrVector2f create(long address) { - return wrap(XrVector2f.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrVector2f createSafe(long address) { - return address == NULL ? null : wrap(XrVector2f.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrVector2f.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrVector2f} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrVector2f malloc(MemoryStack stack) { - return wrap(XrVector2f.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrVector2f} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrVector2f calloc(MemoryStack stack) { - return wrap(XrVector2f.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #x}. */ - public static float nx(long struct) { return UNSAFE.getFloat(null, struct + XrVector2f.X); } - /** Unsafe version of {@link #y}. */ - public static float ny(long struct) { return UNSAFE.getFloat(null, struct + XrVector2f.Y); } - - /** Unsafe version of {@link #x(float) x}. */ - public static void nx(long struct, float value) { UNSAFE.putFloat(null, struct + XrVector2f.X, value); } - /** Unsafe version of {@link #y(float) y}. */ - public static void ny(long struct, float value) { UNSAFE.putFloat(null, struct + XrVector2f.Y, value); } - - // ----------------------------------- - - /** An array of {@link XrVector2f} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrVector2f ELEMENT_FACTORY = XrVector2f.create(-1L); - - /** - * Creates a new {@code XrVector2f.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrVector2f#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrVector2f getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code x} field. */ - public float x() { return XrVector2f.nx(address()); } - /** @return the value of the {@code y} field. */ - public float y() { return XrVector2f.ny(address()); } - - /** Sets the specified value to the {@code x} field. */ - public Buffer x(float value) { XrVector2f.nx(address(), value); return this; } - /** Sets the specified value to the {@code y} field. */ - public Buffer y(float value) { XrVector2f.ny(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrVector3f.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrVector3f.java deleted file mode 100644 index 0683515a..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrVector3f.java +++ /dev/null @@ -1,289 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrVector3f {
- *     float x;
- *     float y;
- *     float z;
- * }
- */ -public class XrVector3f extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - X, - Y, - Z; - - static { - Layout layout = __struct( - __member(4), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - X = layout.offsetof(0); - Y = layout.offsetof(1); - Z = layout.offsetof(2); - } - - /** - * Creates a {@code XrVector3f} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrVector3f(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code x} field. */ - public float x() { return nx(address()); } - /** @return the value of the {@code y} field. */ - public float y() { return ny(address()); } - /** @return the value of the {@code z} field. */ - public float z() { return nz(address()); } - - /** Sets the specified value to the {@code x} field. */ - public XrVector3f x(float value) { nx(address(), value); return this; } - /** Sets the specified value to the {@code y} field. */ - public XrVector3f y(float value) { ny(address(), value); return this; } - /** Sets the specified value to the {@code z} field. */ - public XrVector3f z(float value) { nz(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrVector3f set( - float x, - float y, - float z - ) { - x(x); - y(y); - z(z); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrVector3f set(XrVector3f src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrVector3f} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrVector3f malloc() { - return wrap(XrVector3f.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrVector3f} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrVector3f calloc() { - return wrap(XrVector3f.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrVector3f} instance allocated with {@link BufferUtils}. */ - public static XrVector3f create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrVector3f.class, memAddress(container), container); - } - - /** Returns a new {@code XrVector3f} instance for the specified memory address. */ - public static XrVector3f create(long address) { - return wrap(XrVector3f.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrVector3f createSafe(long address) { - return address == NULL ? null : wrap(XrVector3f.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrVector3f.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrVector3f} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrVector3f malloc(MemoryStack stack) { - return wrap(XrVector3f.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrVector3f} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrVector3f calloc(MemoryStack stack) { - return wrap(XrVector3f.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #x}. */ - public static float nx(long struct) { return UNSAFE.getFloat(null, struct + XrVector3f.X); } - /** Unsafe version of {@link #y}. */ - public static float ny(long struct) { return UNSAFE.getFloat(null, struct + XrVector3f.Y); } - /** Unsafe version of {@link #z}. */ - public static float nz(long struct) { return UNSAFE.getFloat(null, struct + XrVector3f.Z); } - - /** Unsafe version of {@link #x(float) x}. */ - public static void nx(long struct, float value) { UNSAFE.putFloat(null, struct + XrVector3f.X, value); } - /** Unsafe version of {@link #y(float) y}. */ - public static void ny(long struct, float value) { UNSAFE.putFloat(null, struct + XrVector3f.Y, value); } - /** Unsafe version of {@link #z(float) z}. */ - public static void nz(long struct, float value) { UNSAFE.putFloat(null, struct + XrVector3f.Z, value); } - - // ----------------------------------- - - /** An array of {@link XrVector3f} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrVector3f ELEMENT_FACTORY = XrVector3f.create(-1L); - - /** - * Creates a new {@code XrVector3f.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrVector3f#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrVector3f getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code x} field. */ - public float x() { return XrVector3f.nx(address()); } - /** @return the value of the {@code y} field. */ - public float y() { return XrVector3f.ny(address()); } - /** @return the value of the {@code z} field. */ - public float z() { return XrVector3f.nz(address()); } - - /** Sets the specified value to the {@code x} field. */ - public Buffer x(float value) { XrVector3f.nx(address(), value); return this; } - /** Sets the specified value to the {@code y} field. */ - public Buffer y(float value) { XrVector3f.ny(address(), value); return this; } - /** Sets the specified value to the {@code z} field. */ - public Buffer z(float value) { XrVector3f.nz(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrVector4f.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrVector4f.java deleted file mode 100644 index acd5eec2..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrVector4f.java +++ /dev/null @@ -1,307 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrVector4f {
- *     float x;
- *     float y;
- *     float z;
- *     float w;
- * }
- */ -public class XrVector4f extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - X, - Y, - Z, - W; - - static { - Layout layout = __struct( - __member(4), - __member(4), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - X = layout.offsetof(0); - Y = layout.offsetof(1); - Z = layout.offsetof(2); - W = layout.offsetof(3); - } - - /** - * Creates a {@code XrVector4f} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrVector4f(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code x} field. */ - public float x() { return nx(address()); } - /** @return the value of the {@code y} field. */ - public float y() { return ny(address()); } - /** @return the value of the {@code z} field. */ - public float z() { return nz(address()); } - /** @return the value of the {@code w} field. */ - public float w() { return nw(address()); } - - /** Sets the specified value to the {@code x} field. */ - public XrVector4f x(float value) { nx(address(), value); return this; } - /** Sets the specified value to the {@code y} field. */ - public XrVector4f y(float value) { ny(address(), value); return this; } - /** Sets the specified value to the {@code z} field. */ - public XrVector4f z(float value) { nz(address(), value); return this; } - /** Sets the specified value to the {@code w} field. */ - public XrVector4f w(float value) { nw(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrVector4f set( - float x, - float y, - float z, - float w - ) { - x(x); - y(y); - z(z); - w(w); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrVector4f set(XrVector4f src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrVector4f} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrVector4f malloc() { - return wrap(XrVector4f.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrVector4f} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrVector4f calloc() { - return wrap(XrVector4f.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrVector4f} instance allocated with {@link BufferUtils}. */ - public static XrVector4f create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrVector4f.class, memAddress(container), container); - } - - /** Returns a new {@code XrVector4f} instance for the specified memory address. */ - public static XrVector4f create(long address) { - return wrap(XrVector4f.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrVector4f createSafe(long address) { - return address == NULL ? null : wrap(XrVector4f.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrVector4f.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrVector4f} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrVector4f malloc(MemoryStack stack) { - return wrap(XrVector4f.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrVector4f} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrVector4f calloc(MemoryStack stack) { - return wrap(XrVector4f.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #x}. */ - public static float nx(long struct) { return UNSAFE.getFloat(null, struct + XrVector4f.X); } - /** Unsafe version of {@link #y}. */ - public static float ny(long struct) { return UNSAFE.getFloat(null, struct + XrVector4f.Y); } - /** Unsafe version of {@link #z}. */ - public static float nz(long struct) { return UNSAFE.getFloat(null, struct + XrVector4f.Z); } - /** Unsafe version of {@link #w}. */ - public static float nw(long struct) { return UNSAFE.getFloat(null, struct + XrVector4f.W); } - - /** Unsafe version of {@link #x(float) x}. */ - public static void nx(long struct, float value) { UNSAFE.putFloat(null, struct + XrVector4f.X, value); } - /** Unsafe version of {@link #y(float) y}. */ - public static void ny(long struct, float value) { UNSAFE.putFloat(null, struct + XrVector4f.Y, value); } - /** Unsafe version of {@link #z(float) z}. */ - public static void nz(long struct, float value) { UNSAFE.putFloat(null, struct + XrVector4f.Z, value); } - /** Unsafe version of {@link #w(float) w}. */ - public static void nw(long struct, float value) { UNSAFE.putFloat(null, struct + XrVector4f.W, value); } - - // ----------------------------------- - - /** An array of {@link XrVector4f} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrVector4f ELEMENT_FACTORY = XrVector4f.create(-1L); - - /** - * Creates a new {@code XrVector4f.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrVector4f#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrVector4f getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code x} field. */ - public float x() { return XrVector4f.nx(address()); } - /** @return the value of the {@code y} field. */ - public float y() { return XrVector4f.ny(address()); } - /** @return the value of the {@code z} field. */ - public float z() { return XrVector4f.nz(address()); } - /** @return the value of the {@code w} field. */ - public float w() { return XrVector4f.nw(address()); } - - /** Sets the specified value to the {@code x} field. */ - public Buffer x(float value) { XrVector4f.nx(address(), value); return this; } - /** Sets the specified value to the {@code y} field. */ - public Buffer y(float value) { XrVector4f.ny(address(), value); return this; } - /** Sets the specified value to the {@code z} field. */ - public Buffer z(float value) { XrVector4f.nz(address(), value); return this; } - /** Sets the specified value to the {@code w} field. */ - public Buffer w(float value) { XrVector4f.nw(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrVector4sFB.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrVector4sFB.java deleted file mode 100644 index 639a95b9..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrVector4sFB.java +++ /dev/null @@ -1,315 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrVector4sFB {
- *     int16_t x;
- *     int16_t y;
- *     int16_t z;
- *     int16_t w;
- * }
- */ -public class XrVector4sFB extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - X, - Y, - Z, - W; - - static { - Layout layout = __struct( - __member(2), - __member(2), - __member(2), - __member(2) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - X = layout.offsetof(0); - Y = layout.offsetof(1); - Z = layout.offsetof(2); - W = layout.offsetof(3); - } - - /** - * Creates a {@code XrVector4sFB} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrVector4sFB(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code x} field. */ - @NativeType("int16_t") - public short x() { return nx(address()); } - /** @return the value of the {@code y} field. */ - @NativeType("int16_t") - public short y() { return ny(address()); } - /** @return the value of the {@code z} field. */ - @NativeType("int16_t") - public short z() { return nz(address()); } - /** @return the value of the {@code w} field. */ - @NativeType("int16_t") - public short w() { return nw(address()); } - - /** Sets the specified value to the {@code x} field. */ - public XrVector4sFB x(@NativeType("int16_t") short value) { nx(address(), value); return this; } - /** Sets the specified value to the {@code y} field. */ - public XrVector4sFB y(@NativeType("int16_t") short value) { ny(address(), value); return this; } - /** Sets the specified value to the {@code z} field. */ - public XrVector4sFB z(@NativeType("int16_t") short value) { nz(address(), value); return this; } - /** Sets the specified value to the {@code w} field. */ - public XrVector4sFB w(@NativeType("int16_t") short value) { nw(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrVector4sFB set( - short x, - short y, - short z, - short w - ) { - x(x); - y(y); - z(z); - w(w); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrVector4sFB set(XrVector4sFB src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrVector4sFB} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrVector4sFB malloc() { - return wrap(XrVector4sFB.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrVector4sFB} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrVector4sFB calloc() { - return wrap(XrVector4sFB.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrVector4sFB} instance allocated with {@link BufferUtils}. */ - public static XrVector4sFB create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrVector4sFB.class, memAddress(container), container); - } - - /** Returns a new {@code XrVector4sFB} instance for the specified memory address. */ - public static XrVector4sFB create(long address) { - return wrap(XrVector4sFB.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrVector4sFB createSafe(long address) { - return address == NULL ? null : wrap(XrVector4sFB.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrVector4sFB.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrVector4sFB} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrVector4sFB malloc(MemoryStack stack) { - return wrap(XrVector4sFB.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrVector4sFB} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrVector4sFB calloc(MemoryStack stack) { - return wrap(XrVector4sFB.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #x}. */ - public static short nx(long struct) { return UNSAFE.getShort(null, struct + XrVector4sFB.X); } - /** Unsafe version of {@link #y}. */ - public static short ny(long struct) { return UNSAFE.getShort(null, struct + XrVector4sFB.Y); } - /** Unsafe version of {@link #z}. */ - public static short nz(long struct) { return UNSAFE.getShort(null, struct + XrVector4sFB.Z); } - /** Unsafe version of {@link #w}. */ - public static short nw(long struct) { return UNSAFE.getShort(null, struct + XrVector4sFB.W); } - - /** Unsafe version of {@link #x(short) x}. */ - public static void nx(long struct, short value) { UNSAFE.putShort(null, struct + XrVector4sFB.X, value); } - /** Unsafe version of {@link #y(short) y}. */ - public static void ny(long struct, short value) { UNSAFE.putShort(null, struct + XrVector4sFB.Y, value); } - /** Unsafe version of {@link #z(short) z}. */ - public static void nz(long struct, short value) { UNSAFE.putShort(null, struct + XrVector4sFB.Z, value); } - /** Unsafe version of {@link #w(short) w}. */ - public static void nw(long struct, short value) { UNSAFE.putShort(null, struct + XrVector4sFB.W, value); } - - // ----------------------------------- - - /** An array of {@link XrVector4sFB} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrVector4sFB ELEMENT_FACTORY = XrVector4sFB.create(-1L); - - /** - * Creates a new {@code XrVector4sFB.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrVector4sFB#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrVector4sFB getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code x} field. */ - @NativeType("int16_t") - public short x() { return XrVector4sFB.nx(address()); } - /** @return the value of the {@code y} field. */ - @NativeType("int16_t") - public short y() { return XrVector4sFB.ny(address()); } - /** @return the value of the {@code z} field. */ - @NativeType("int16_t") - public short z() { return XrVector4sFB.nz(address()); } - /** @return the value of the {@code w} field. */ - @NativeType("int16_t") - public short w() { return XrVector4sFB.nw(address()); } - - /** Sets the specified value to the {@code x} field. */ - public Buffer x(@NativeType("int16_t") short value) { XrVector4sFB.nx(address(), value); return this; } - /** Sets the specified value to the {@code y} field. */ - public Buffer y(@NativeType("int16_t") short value) { XrVector4sFB.ny(address(), value); return this; } - /** Sets the specified value to the {@code z} field. */ - public Buffer z(@NativeType("int16_t") short value) { XrVector4sFB.nz(address(), value); return this; } - /** Sets the specified value to the {@code w} field. */ - public Buffer w(@NativeType("int16_t") short value) { XrVector4sFB.nw(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrView.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrView.java deleted file mode 100644 index af3f9d69..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrView.java +++ /dev/null @@ -1,323 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrView {
- *     XrStructureType type;
- *     void * next;
- *     {@link XrPosef XrPosef} pose;
- *     {@link XrFovf XrFovf} fov;
- * }
- */ -public class XrView extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - POSE, - FOV; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(XrPosef.SIZEOF, XrPosef.ALIGNOF), - __member(XrFovf.SIZEOF, XrFovf.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - POSE = layout.offsetof(2); - FOV = layout.offsetof(3); - } - - /** - * Creates a {@code XrView} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrView(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return a {@link XrPosef} view of the {@code pose} field. */ - public XrPosef pose() { return npose(address()); } - /** @return a {@link XrFovf} view of the {@code fov} field. */ - public XrFovf fov() { return nfov(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrView type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_VIEW TYPE_VIEW} value to the {@code type} field. */ - public XrView type$Default() { return type(XR10.XR_TYPE_VIEW); } - /** Sets the specified value to the {@code next} field. */ - public XrView next(@NativeType("void *") long value) { nnext(address(), value); return this; } - /** Copies the specified {@link XrPosef} to the {@code pose} field. */ - public XrView pose(XrPosef value) { npose(address(), value); return this; } - /** Passes the {@code pose} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrView pose(java.util.function.Consumer consumer) { consumer.accept(pose()); return this; } - /** Copies the specified {@link XrFovf} to the {@code fov} field. */ - public XrView fov(XrFovf value) { nfov(address(), value); return this; } - /** Passes the {@code fov} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrView fov(java.util.function.Consumer consumer) { consumer.accept(fov()); return this; } - - /** Initializes this struct with the specified values. */ - public XrView set( - int type, - long next, - XrPosef pose, - XrFovf fov - ) { - type(type); - next(next); - pose(pose); - fov(fov); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrView set(XrView src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrView} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrView malloc() { - return wrap(XrView.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrView} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrView calloc() { - return wrap(XrView.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrView} instance allocated with {@link BufferUtils}. */ - public static XrView create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrView.class, memAddress(container), container); - } - - /** Returns a new {@code XrView} instance for the specified memory address. */ - public static XrView create(long address) { - return wrap(XrView.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrView createSafe(long address) { - return address == NULL ? null : wrap(XrView.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrView.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrView} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrView malloc(MemoryStack stack) { - return wrap(XrView.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrView} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrView calloc(MemoryStack stack) { - return wrap(XrView.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrView.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrView.NEXT); } - /** Unsafe version of {@link #pose}. */ - public static XrPosef npose(long struct) { return XrPosef.create(struct + XrView.POSE); } - /** Unsafe version of {@link #fov}. */ - public static XrFovf nfov(long struct) { return XrFovf.create(struct + XrView.FOV); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrView.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrView.NEXT, value); } - /** Unsafe version of {@link #pose(XrPosef) pose}. */ - public static void npose(long struct, XrPosef value) { memCopy(value.address(), struct + XrView.POSE, XrPosef.SIZEOF); } - /** Unsafe version of {@link #fov(XrFovf) fov}. */ - public static void nfov(long struct, XrFovf value) { memCopy(value.address(), struct + XrView.FOV, XrFovf.SIZEOF); } - - // ----------------------------------- - - /** An array of {@link XrView} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrView ELEMENT_FACTORY = XrView.create(-1L); - - /** - * Creates a new {@code XrView.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrView#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrView getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrView.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrView.nnext(address()); } - /** @return a {@link XrPosef} view of the {@code pose} field. */ - public XrPosef pose() { return XrView.npose(address()); } - /** @return a {@link XrFovf} view of the {@code fov} field. */ - public XrFovf fov() { return XrView.nfov(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrView.ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_VIEW TYPE_VIEW} value to the {@code type} field. */ - public Buffer type$Default() { return type(XR10.XR_TYPE_VIEW); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrView.nnext(address(), value); return this; } - /** Copies the specified {@link XrPosef} to the {@code pose} field. */ - public Buffer pose(XrPosef value) { XrView.npose(address(), value); return this; } - /** Passes the {@code pose} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer pose(java.util.function.Consumer consumer) { consumer.accept(pose()); return this; } - /** Copies the specified {@link XrFovf} to the {@code fov} field. */ - public Buffer fov(XrFovf value) { XrView.nfov(address(), value); return this; } - /** Passes the {@code fov} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer fov(java.util.function.Consumer consumer) { consumer.accept(fov()); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrViewConfigurationDepthRangeEXT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrViewConfigurationDepthRangeEXT.java deleted file mode 100644 index 90eaa72f..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrViewConfigurationDepthRangeEXT.java +++ /dev/null @@ -1,351 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrViewConfigurationDepthRangeEXT {
- *     XrStructureType type;
- *     void * next;
- *     float recommendedNearZ;
- *     float minNearZ;
- *     float recommendedFarZ;
- *     float maxFarZ;
- * }
- */ -public class XrViewConfigurationDepthRangeEXT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - RECOMMENDEDNEARZ, - MINNEARZ, - RECOMMENDEDFARZ, - MAXFARZ; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(4), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - RECOMMENDEDNEARZ = layout.offsetof(2); - MINNEARZ = layout.offsetof(3); - RECOMMENDEDFARZ = layout.offsetof(4); - MAXFARZ = layout.offsetof(5); - } - - /** - * Creates a {@code XrViewConfigurationDepthRangeEXT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrViewConfigurationDepthRangeEXT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return the value of the {@code recommendedNearZ} field. */ - public float recommendedNearZ() { return nrecommendedNearZ(address()); } - /** @return the value of the {@code minNearZ} field. */ - public float minNearZ() { return nminNearZ(address()); } - /** @return the value of the {@code recommendedFarZ} field. */ - public float recommendedFarZ() { return nrecommendedFarZ(address()); } - /** @return the value of the {@code maxFarZ} field. */ - public float maxFarZ() { return nmaxFarZ(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrViewConfigurationDepthRangeEXT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link EXTViewConfigurationDepthRange#XR_TYPE_VIEW_CONFIGURATION_DEPTH_RANGE_EXT TYPE_VIEW_CONFIGURATION_DEPTH_RANGE_EXT} value to the {@code type} field. */ - public XrViewConfigurationDepthRangeEXT type$Default() { return type(EXTViewConfigurationDepthRange.XR_TYPE_VIEW_CONFIGURATION_DEPTH_RANGE_EXT); } - /** Sets the specified value to the {@code next} field. */ - public XrViewConfigurationDepthRangeEXT next(@NativeType("void *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code recommendedNearZ} field. */ - public XrViewConfigurationDepthRangeEXT recommendedNearZ(float value) { nrecommendedNearZ(address(), value); return this; } - /** Sets the specified value to the {@code minNearZ} field. */ - public XrViewConfigurationDepthRangeEXT minNearZ(float value) { nminNearZ(address(), value); return this; } - /** Sets the specified value to the {@code recommendedFarZ} field. */ - public XrViewConfigurationDepthRangeEXT recommendedFarZ(float value) { nrecommendedFarZ(address(), value); return this; } - /** Sets the specified value to the {@code maxFarZ} field. */ - public XrViewConfigurationDepthRangeEXT maxFarZ(float value) { nmaxFarZ(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrViewConfigurationDepthRangeEXT set( - int type, - long next, - float recommendedNearZ, - float minNearZ, - float recommendedFarZ, - float maxFarZ - ) { - type(type); - next(next); - recommendedNearZ(recommendedNearZ); - minNearZ(minNearZ); - recommendedFarZ(recommendedFarZ); - maxFarZ(maxFarZ); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrViewConfigurationDepthRangeEXT set(XrViewConfigurationDepthRangeEXT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrViewConfigurationDepthRangeEXT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrViewConfigurationDepthRangeEXT malloc() { - return wrap(XrViewConfigurationDepthRangeEXT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrViewConfigurationDepthRangeEXT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrViewConfigurationDepthRangeEXT calloc() { - return wrap(XrViewConfigurationDepthRangeEXT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrViewConfigurationDepthRangeEXT} instance allocated with {@link BufferUtils}. */ - public static XrViewConfigurationDepthRangeEXT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrViewConfigurationDepthRangeEXT.class, memAddress(container), container); - } - - /** Returns a new {@code XrViewConfigurationDepthRangeEXT} instance for the specified memory address. */ - public static XrViewConfigurationDepthRangeEXT create(long address) { - return wrap(XrViewConfigurationDepthRangeEXT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrViewConfigurationDepthRangeEXT createSafe(long address) { - return address == NULL ? null : wrap(XrViewConfigurationDepthRangeEXT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrViewConfigurationDepthRangeEXT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrViewConfigurationDepthRangeEXT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrViewConfigurationDepthRangeEXT malloc(MemoryStack stack) { - return wrap(XrViewConfigurationDepthRangeEXT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrViewConfigurationDepthRangeEXT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrViewConfigurationDepthRangeEXT calloc(MemoryStack stack) { - return wrap(XrViewConfigurationDepthRangeEXT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrViewConfigurationDepthRangeEXT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrViewConfigurationDepthRangeEXT.NEXT); } - /** Unsafe version of {@link #recommendedNearZ}. */ - public static float nrecommendedNearZ(long struct) { return UNSAFE.getFloat(null, struct + XrViewConfigurationDepthRangeEXT.RECOMMENDEDNEARZ); } - /** Unsafe version of {@link #minNearZ}. */ - public static float nminNearZ(long struct) { return UNSAFE.getFloat(null, struct + XrViewConfigurationDepthRangeEXT.MINNEARZ); } - /** Unsafe version of {@link #recommendedFarZ}. */ - public static float nrecommendedFarZ(long struct) { return UNSAFE.getFloat(null, struct + XrViewConfigurationDepthRangeEXT.RECOMMENDEDFARZ); } - /** Unsafe version of {@link #maxFarZ}. */ - public static float nmaxFarZ(long struct) { return UNSAFE.getFloat(null, struct + XrViewConfigurationDepthRangeEXT.MAXFARZ); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrViewConfigurationDepthRangeEXT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrViewConfigurationDepthRangeEXT.NEXT, value); } - /** Unsafe version of {@link #recommendedNearZ(float) recommendedNearZ}. */ - public static void nrecommendedNearZ(long struct, float value) { UNSAFE.putFloat(null, struct + XrViewConfigurationDepthRangeEXT.RECOMMENDEDNEARZ, value); } - /** Unsafe version of {@link #minNearZ(float) minNearZ}. */ - public static void nminNearZ(long struct, float value) { UNSAFE.putFloat(null, struct + XrViewConfigurationDepthRangeEXT.MINNEARZ, value); } - /** Unsafe version of {@link #recommendedFarZ(float) recommendedFarZ}. */ - public static void nrecommendedFarZ(long struct, float value) { UNSAFE.putFloat(null, struct + XrViewConfigurationDepthRangeEXT.RECOMMENDEDFARZ, value); } - /** Unsafe version of {@link #maxFarZ(float) maxFarZ}. */ - public static void nmaxFarZ(long struct, float value) { UNSAFE.putFloat(null, struct + XrViewConfigurationDepthRangeEXT.MAXFARZ, value); } - - // ----------------------------------- - - /** An array of {@link XrViewConfigurationDepthRangeEXT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrViewConfigurationDepthRangeEXT ELEMENT_FACTORY = XrViewConfigurationDepthRangeEXT.create(-1L); - - /** - * Creates a new {@code XrViewConfigurationDepthRangeEXT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrViewConfigurationDepthRangeEXT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrViewConfigurationDepthRangeEXT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrViewConfigurationDepthRangeEXT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrViewConfigurationDepthRangeEXT.nnext(address()); } - /** @return the value of the {@code recommendedNearZ} field. */ - public float recommendedNearZ() { return XrViewConfigurationDepthRangeEXT.nrecommendedNearZ(address()); } - /** @return the value of the {@code minNearZ} field. */ - public float minNearZ() { return XrViewConfigurationDepthRangeEXT.nminNearZ(address()); } - /** @return the value of the {@code recommendedFarZ} field. */ - public float recommendedFarZ() { return XrViewConfigurationDepthRangeEXT.nrecommendedFarZ(address()); } - /** @return the value of the {@code maxFarZ} field. */ - public float maxFarZ() { return XrViewConfigurationDepthRangeEXT.nmaxFarZ(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrViewConfigurationDepthRangeEXT.ntype(address(), value); return this; } - /** Sets the {@link EXTViewConfigurationDepthRange#XR_TYPE_VIEW_CONFIGURATION_DEPTH_RANGE_EXT TYPE_VIEW_CONFIGURATION_DEPTH_RANGE_EXT} value to the {@code type} field. */ - public Buffer type$Default() { return type(EXTViewConfigurationDepthRange.XR_TYPE_VIEW_CONFIGURATION_DEPTH_RANGE_EXT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrViewConfigurationDepthRangeEXT.nnext(address(), value); return this; } - /** Sets the specified value to the {@code recommendedNearZ} field. */ - public Buffer recommendedNearZ(float value) { XrViewConfigurationDepthRangeEXT.nrecommendedNearZ(address(), value); return this; } - /** Sets the specified value to the {@code minNearZ} field. */ - public Buffer minNearZ(float value) { XrViewConfigurationDepthRangeEXT.nminNearZ(address(), value); return this; } - /** Sets the specified value to the {@code recommendedFarZ} field. */ - public Buffer recommendedFarZ(float value) { XrViewConfigurationDepthRangeEXT.nrecommendedFarZ(address(), value); return this; } - /** Sets the specified value to the {@code maxFarZ} field. */ - public Buffer maxFarZ(float value) { XrViewConfigurationDepthRangeEXT.nmaxFarZ(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrViewConfigurationProperties.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrViewConfigurationProperties.java deleted file mode 100644 index 9220ba88..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrViewConfigurationProperties.java +++ /dev/null @@ -1,319 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrViewConfigurationProperties {
- *     XrStructureType type;
- *     void * next;
- *     XrViewConfigurationType viewConfigurationType;
- *     XrBool32 fovMutable;
- * }
- */ -public class XrViewConfigurationProperties extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - VIEWCONFIGURATIONTYPE, - FOVMUTABLE; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - VIEWCONFIGURATIONTYPE = layout.offsetof(2); - FOVMUTABLE = layout.offsetof(3); - } - - /** - * Creates a {@code XrViewConfigurationProperties} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrViewConfigurationProperties(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return the value of the {@code viewConfigurationType} field. */ - @NativeType("XrViewConfigurationType") - public int viewConfigurationType() { return nviewConfigurationType(address()); } - /** @return the value of the {@code fovMutable} field. */ - @NativeType("XrBool32") - public boolean fovMutable() { return nfovMutable(address()) != 0; } - - /** Sets the specified value to the {@code type} field. */ - public XrViewConfigurationProperties type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_VIEW_CONFIGURATION_PROPERTIES TYPE_VIEW_CONFIGURATION_PROPERTIES} value to the {@code type} field. */ - public XrViewConfigurationProperties type$Default() { return type(XR10.XR_TYPE_VIEW_CONFIGURATION_PROPERTIES); } - /** Sets the specified value to the {@code next} field. */ - public XrViewConfigurationProperties next(@NativeType("void *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code viewConfigurationType} field. */ - public XrViewConfigurationProperties viewConfigurationType(@NativeType("XrViewConfigurationType") int value) { nviewConfigurationType(address(), value); return this; } - /** Sets the specified value to the {@code fovMutable} field. */ - public XrViewConfigurationProperties fovMutable(@NativeType("XrBool32") boolean value) { nfovMutable(address(), value ? 1 : 0); return this; } - - /** Initializes this struct with the specified values. */ - public XrViewConfigurationProperties set( - int type, - long next, - int viewConfigurationType, - boolean fovMutable - ) { - type(type); - next(next); - viewConfigurationType(viewConfigurationType); - fovMutable(fovMutable); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrViewConfigurationProperties set(XrViewConfigurationProperties src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrViewConfigurationProperties} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrViewConfigurationProperties malloc() { - return wrap(XrViewConfigurationProperties.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrViewConfigurationProperties} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrViewConfigurationProperties calloc() { - return wrap(XrViewConfigurationProperties.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrViewConfigurationProperties} instance allocated with {@link BufferUtils}. */ - public static XrViewConfigurationProperties create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrViewConfigurationProperties.class, memAddress(container), container); - } - - /** Returns a new {@code XrViewConfigurationProperties} instance for the specified memory address. */ - public static XrViewConfigurationProperties create(long address) { - return wrap(XrViewConfigurationProperties.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrViewConfigurationProperties createSafe(long address) { - return address == NULL ? null : wrap(XrViewConfigurationProperties.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrViewConfigurationProperties.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrViewConfigurationProperties} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrViewConfigurationProperties malloc(MemoryStack stack) { - return wrap(XrViewConfigurationProperties.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrViewConfigurationProperties} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrViewConfigurationProperties calloc(MemoryStack stack) { - return wrap(XrViewConfigurationProperties.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrViewConfigurationProperties.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrViewConfigurationProperties.NEXT); } - /** Unsafe version of {@link #viewConfigurationType}. */ - public static int nviewConfigurationType(long struct) { return UNSAFE.getInt(null, struct + XrViewConfigurationProperties.VIEWCONFIGURATIONTYPE); } - /** Unsafe version of {@link #fovMutable}. */ - public static int nfovMutable(long struct) { return UNSAFE.getInt(null, struct + XrViewConfigurationProperties.FOVMUTABLE); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrViewConfigurationProperties.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrViewConfigurationProperties.NEXT, value); } - /** Unsafe version of {@link #viewConfigurationType(int) viewConfigurationType}. */ - public static void nviewConfigurationType(long struct, int value) { UNSAFE.putInt(null, struct + XrViewConfigurationProperties.VIEWCONFIGURATIONTYPE, value); } - /** Unsafe version of {@link #fovMutable(boolean) fovMutable}. */ - public static void nfovMutable(long struct, int value) { UNSAFE.putInt(null, struct + XrViewConfigurationProperties.FOVMUTABLE, value); } - - // ----------------------------------- - - /** An array of {@link XrViewConfigurationProperties} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrViewConfigurationProperties ELEMENT_FACTORY = XrViewConfigurationProperties.create(-1L); - - /** - * Creates a new {@code XrViewConfigurationProperties.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrViewConfigurationProperties#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrViewConfigurationProperties getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrViewConfigurationProperties.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrViewConfigurationProperties.nnext(address()); } - /** @return the value of the {@code viewConfigurationType} field. */ - @NativeType("XrViewConfigurationType") - public int viewConfigurationType() { return XrViewConfigurationProperties.nviewConfigurationType(address()); } - /** @return the value of the {@code fovMutable} field. */ - @NativeType("XrBool32") - public boolean fovMutable() { return XrViewConfigurationProperties.nfovMutable(address()) != 0; } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrViewConfigurationProperties.ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_VIEW_CONFIGURATION_PROPERTIES TYPE_VIEW_CONFIGURATION_PROPERTIES} value to the {@code type} field. */ - public Buffer type$Default() { return type(XR10.XR_TYPE_VIEW_CONFIGURATION_PROPERTIES); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrViewConfigurationProperties.nnext(address(), value); return this; } - /** Sets the specified value to the {@code viewConfigurationType} field. */ - public Buffer viewConfigurationType(@NativeType("XrViewConfigurationType") int value) { XrViewConfigurationProperties.nviewConfigurationType(address(), value); return this; } - /** Sets the specified value to the {@code fovMutable} field. */ - public Buffer fovMutable(@NativeType("XrBool32") boolean value) { XrViewConfigurationProperties.nfovMutable(address(), value ? 1 : 0); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrViewConfigurationView.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrViewConfigurationView.java deleted file mode 100644 index 1230aed0..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrViewConfigurationView.java +++ /dev/null @@ -1,399 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrViewConfigurationView {
- *     XrStructureType type;
- *     void * next;
- *     uint32_t recommendedImageRectWidth;
- *     uint32_t maxImageRectWidth;
- *     uint32_t recommendedImageRectHeight;
- *     uint32_t maxImageRectHeight;
- *     uint32_t recommendedSwapchainSampleCount;
- *     uint32_t maxSwapchainSampleCount;
- * }
- */ -public class XrViewConfigurationView extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - RECOMMENDEDIMAGERECTWIDTH, - MAXIMAGERECTWIDTH, - RECOMMENDEDIMAGERECTHEIGHT, - MAXIMAGERECTHEIGHT, - RECOMMENDEDSWAPCHAINSAMPLECOUNT, - MAXSWAPCHAINSAMPLECOUNT; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - RECOMMENDEDIMAGERECTWIDTH = layout.offsetof(2); - MAXIMAGERECTWIDTH = layout.offsetof(3); - RECOMMENDEDIMAGERECTHEIGHT = layout.offsetof(4); - MAXIMAGERECTHEIGHT = layout.offsetof(5); - RECOMMENDEDSWAPCHAINSAMPLECOUNT = layout.offsetof(6); - MAXSWAPCHAINSAMPLECOUNT = layout.offsetof(7); - } - - /** - * Creates a {@code XrViewConfigurationView} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrViewConfigurationView(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return the value of the {@code recommendedImageRectWidth} field. */ - @NativeType("uint32_t") - public int recommendedImageRectWidth() { return nrecommendedImageRectWidth(address()); } - /** @return the value of the {@code maxImageRectWidth} field. */ - @NativeType("uint32_t") - public int maxImageRectWidth() { return nmaxImageRectWidth(address()); } - /** @return the value of the {@code recommendedImageRectHeight} field. */ - @NativeType("uint32_t") - public int recommendedImageRectHeight() { return nrecommendedImageRectHeight(address()); } - /** @return the value of the {@code maxImageRectHeight} field. */ - @NativeType("uint32_t") - public int maxImageRectHeight() { return nmaxImageRectHeight(address()); } - /** @return the value of the {@code recommendedSwapchainSampleCount} field. */ - @NativeType("uint32_t") - public int recommendedSwapchainSampleCount() { return nrecommendedSwapchainSampleCount(address()); } - /** @return the value of the {@code maxSwapchainSampleCount} field. */ - @NativeType("uint32_t") - public int maxSwapchainSampleCount() { return nmaxSwapchainSampleCount(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrViewConfigurationView type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_VIEW_CONFIGURATION_VIEW TYPE_VIEW_CONFIGURATION_VIEW} value to the {@code type} field. */ - public XrViewConfigurationView type$Default() { return type(XR10.XR_TYPE_VIEW_CONFIGURATION_VIEW); } - /** Sets the specified value to the {@code next} field. */ - public XrViewConfigurationView next(@NativeType("void *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code recommendedImageRectWidth} field. */ - public XrViewConfigurationView recommendedImageRectWidth(@NativeType("uint32_t") int value) { nrecommendedImageRectWidth(address(), value); return this; } - /** Sets the specified value to the {@code maxImageRectWidth} field. */ - public XrViewConfigurationView maxImageRectWidth(@NativeType("uint32_t") int value) { nmaxImageRectWidth(address(), value); return this; } - /** Sets the specified value to the {@code recommendedImageRectHeight} field. */ - public XrViewConfigurationView recommendedImageRectHeight(@NativeType("uint32_t") int value) { nrecommendedImageRectHeight(address(), value); return this; } - /** Sets the specified value to the {@code maxImageRectHeight} field. */ - public XrViewConfigurationView maxImageRectHeight(@NativeType("uint32_t") int value) { nmaxImageRectHeight(address(), value); return this; } - /** Sets the specified value to the {@code recommendedSwapchainSampleCount} field. */ - public XrViewConfigurationView recommendedSwapchainSampleCount(@NativeType("uint32_t") int value) { nrecommendedSwapchainSampleCount(address(), value); return this; } - /** Sets the specified value to the {@code maxSwapchainSampleCount} field. */ - public XrViewConfigurationView maxSwapchainSampleCount(@NativeType("uint32_t") int value) { nmaxSwapchainSampleCount(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrViewConfigurationView set( - int type, - long next, - int recommendedImageRectWidth, - int maxImageRectWidth, - int recommendedImageRectHeight, - int maxImageRectHeight, - int recommendedSwapchainSampleCount, - int maxSwapchainSampleCount - ) { - type(type); - next(next); - recommendedImageRectWidth(recommendedImageRectWidth); - maxImageRectWidth(maxImageRectWidth); - recommendedImageRectHeight(recommendedImageRectHeight); - maxImageRectHeight(maxImageRectHeight); - recommendedSwapchainSampleCount(recommendedSwapchainSampleCount); - maxSwapchainSampleCount(maxSwapchainSampleCount); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrViewConfigurationView set(XrViewConfigurationView src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrViewConfigurationView} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrViewConfigurationView malloc() { - return wrap(XrViewConfigurationView.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrViewConfigurationView} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrViewConfigurationView calloc() { - return wrap(XrViewConfigurationView.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrViewConfigurationView} instance allocated with {@link BufferUtils}. */ - public static XrViewConfigurationView create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrViewConfigurationView.class, memAddress(container), container); - } - - /** Returns a new {@code XrViewConfigurationView} instance for the specified memory address. */ - public static XrViewConfigurationView create(long address) { - return wrap(XrViewConfigurationView.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrViewConfigurationView createSafe(long address) { - return address == NULL ? null : wrap(XrViewConfigurationView.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrViewConfigurationView.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrViewConfigurationView} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrViewConfigurationView malloc(MemoryStack stack) { - return wrap(XrViewConfigurationView.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrViewConfigurationView} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrViewConfigurationView calloc(MemoryStack stack) { - return wrap(XrViewConfigurationView.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrViewConfigurationView.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrViewConfigurationView.NEXT); } - /** Unsafe version of {@link #recommendedImageRectWidth}. */ - public static int nrecommendedImageRectWidth(long struct) { return UNSAFE.getInt(null, struct + XrViewConfigurationView.RECOMMENDEDIMAGERECTWIDTH); } - /** Unsafe version of {@link #maxImageRectWidth}. */ - public static int nmaxImageRectWidth(long struct) { return UNSAFE.getInt(null, struct + XrViewConfigurationView.MAXIMAGERECTWIDTH); } - /** Unsafe version of {@link #recommendedImageRectHeight}. */ - public static int nrecommendedImageRectHeight(long struct) { return UNSAFE.getInt(null, struct + XrViewConfigurationView.RECOMMENDEDIMAGERECTHEIGHT); } - /** Unsafe version of {@link #maxImageRectHeight}. */ - public static int nmaxImageRectHeight(long struct) { return UNSAFE.getInt(null, struct + XrViewConfigurationView.MAXIMAGERECTHEIGHT); } - /** Unsafe version of {@link #recommendedSwapchainSampleCount}. */ - public static int nrecommendedSwapchainSampleCount(long struct) { return UNSAFE.getInt(null, struct + XrViewConfigurationView.RECOMMENDEDSWAPCHAINSAMPLECOUNT); } - /** Unsafe version of {@link #maxSwapchainSampleCount}. */ - public static int nmaxSwapchainSampleCount(long struct) { return UNSAFE.getInt(null, struct + XrViewConfigurationView.MAXSWAPCHAINSAMPLECOUNT); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrViewConfigurationView.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrViewConfigurationView.NEXT, value); } - /** Unsafe version of {@link #recommendedImageRectWidth(int) recommendedImageRectWidth}. */ - public static void nrecommendedImageRectWidth(long struct, int value) { UNSAFE.putInt(null, struct + XrViewConfigurationView.RECOMMENDEDIMAGERECTWIDTH, value); } - /** Unsafe version of {@link #maxImageRectWidth(int) maxImageRectWidth}. */ - public static void nmaxImageRectWidth(long struct, int value) { UNSAFE.putInt(null, struct + XrViewConfigurationView.MAXIMAGERECTWIDTH, value); } - /** Unsafe version of {@link #recommendedImageRectHeight(int) recommendedImageRectHeight}. */ - public static void nrecommendedImageRectHeight(long struct, int value) { UNSAFE.putInt(null, struct + XrViewConfigurationView.RECOMMENDEDIMAGERECTHEIGHT, value); } - /** Unsafe version of {@link #maxImageRectHeight(int) maxImageRectHeight}. */ - public static void nmaxImageRectHeight(long struct, int value) { UNSAFE.putInt(null, struct + XrViewConfigurationView.MAXIMAGERECTHEIGHT, value); } - /** Unsafe version of {@link #recommendedSwapchainSampleCount(int) recommendedSwapchainSampleCount}. */ - public static void nrecommendedSwapchainSampleCount(long struct, int value) { UNSAFE.putInt(null, struct + XrViewConfigurationView.RECOMMENDEDSWAPCHAINSAMPLECOUNT, value); } - /** Unsafe version of {@link #maxSwapchainSampleCount(int) maxSwapchainSampleCount}. */ - public static void nmaxSwapchainSampleCount(long struct, int value) { UNSAFE.putInt(null, struct + XrViewConfigurationView.MAXSWAPCHAINSAMPLECOUNT, value); } - - // ----------------------------------- - - /** An array of {@link XrViewConfigurationView} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrViewConfigurationView ELEMENT_FACTORY = XrViewConfigurationView.create(-1L); - - /** - * Creates a new {@code XrViewConfigurationView.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrViewConfigurationView#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrViewConfigurationView getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrViewConfigurationView.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrViewConfigurationView.nnext(address()); } - /** @return the value of the {@code recommendedImageRectWidth} field. */ - @NativeType("uint32_t") - public int recommendedImageRectWidth() { return XrViewConfigurationView.nrecommendedImageRectWidth(address()); } - /** @return the value of the {@code maxImageRectWidth} field. */ - @NativeType("uint32_t") - public int maxImageRectWidth() { return XrViewConfigurationView.nmaxImageRectWidth(address()); } - /** @return the value of the {@code recommendedImageRectHeight} field. */ - @NativeType("uint32_t") - public int recommendedImageRectHeight() { return XrViewConfigurationView.nrecommendedImageRectHeight(address()); } - /** @return the value of the {@code maxImageRectHeight} field. */ - @NativeType("uint32_t") - public int maxImageRectHeight() { return XrViewConfigurationView.nmaxImageRectHeight(address()); } - /** @return the value of the {@code recommendedSwapchainSampleCount} field. */ - @NativeType("uint32_t") - public int recommendedSwapchainSampleCount() { return XrViewConfigurationView.nrecommendedSwapchainSampleCount(address()); } - /** @return the value of the {@code maxSwapchainSampleCount} field. */ - @NativeType("uint32_t") - public int maxSwapchainSampleCount() { return XrViewConfigurationView.nmaxSwapchainSampleCount(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrViewConfigurationView.ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_VIEW_CONFIGURATION_VIEW TYPE_VIEW_CONFIGURATION_VIEW} value to the {@code type} field. */ - public Buffer type$Default() { return type(XR10.XR_TYPE_VIEW_CONFIGURATION_VIEW); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrViewConfigurationView.nnext(address(), value); return this; } - /** Sets the specified value to the {@code recommendedImageRectWidth} field. */ - public Buffer recommendedImageRectWidth(@NativeType("uint32_t") int value) { XrViewConfigurationView.nrecommendedImageRectWidth(address(), value); return this; } - /** Sets the specified value to the {@code maxImageRectWidth} field. */ - public Buffer maxImageRectWidth(@NativeType("uint32_t") int value) { XrViewConfigurationView.nmaxImageRectWidth(address(), value); return this; } - /** Sets the specified value to the {@code recommendedImageRectHeight} field. */ - public Buffer recommendedImageRectHeight(@NativeType("uint32_t") int value) { XrViewConfigurationView.nrecommendedImageRectHeight(address(), value); return this; } - /** Sets the specified value to the {@code maxImageRectHeight} field. */ - public Buffer maxImageRectHeight(@NativeType("uint32_t") int value) { XrViewConfigurationView.nmaxImageRectHeight(address(), value); return this; } - /** Sets the specified value to the {@code recommendedSwapchainSampleCount} field. */ - public Buffer recommendedSwapchainSampleCount(@NativeType("uint32_t") int value) { XrViewConfigurationView.nrecommendedSwapchainSampleCount(address(), value); return this; } - /** Sets the specified value to the {@code maxSwapchainSampleCount} field. */ - public Buffer maxSwapchainSampleCount(@NativeType("uint32_t") int value) { XrViewConfigurationView.nmaxSwapchainSampleCount(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrViewConfigurationViewFovEPIC.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrViewConfigurationViewFovEPIC.java deleted file mode 100644 index f4ff096a..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrViewConfigurationViewFovEPIC.java +++ /dev/null @@ -1,323 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrViewConfigurationViewFovEPIC {
- *     XrStructureType type;
- *     void const * next;
- *     {@link XrFovf XrFovf} recommendedFov;
- *     {@link XrFovf XrFovf} maxMutableFov;
- * }
- */ -public class XrViewConfigurationViewFovEPIC extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - RECOMMENDEDFOV, - MAXMUTABLEFOV; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(XrFovf.SIZEOF, XrFovf.ALIGNOF), - __member(XrFovf.SIZEOF, XrFovf.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - RECOMMENDEDFOV = layout.offsetof(2); - MAXMUTABLEFOV = layout.offsetof(3); - } - - /** - * Creates a {@code XrViewConfigurationViewFovEPIC} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrViewConfigurationViewFovEPIC(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return a {@link XrFovf} view of the {@code recommendedFov} field. */ - public XrFovf recommendedFov() { return nrecommendedFov(address()); } - /** @return a {@link XrFovf} view of the {@code maxMutableFov} field. */ - public XrFovf maxMutableFov() { return nmaxMutableFov(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrViewConfigurationViewFovEPIC type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link EPICViewConfigurationFov#XR_TYPE_VIEW_CONFIGURATION_VIEW_FOV_EPIC TYPE_VIEW_CONFIGURATION_VIEW_FOV_EPIC} value to the {@code type} field. */ - public XrViewConfigurationViewFovEPIC type$Default() { return type(EPICViewConfigurationFov.XR_TYPE_VIEW_CONFIGURATION_VIEW_FOV_EPIC); } - /** Sets the specified value to the {@code next} field. */ - public XrViewConfigurationViewFovEPIC next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Copies the specified {@link XrFovf} to the {@code recommendedFov} field. */ - public XrViewConfigurationViewFovEPIC recommendedFov(XrFovf value) { nrecommendedFov(address(), value); return this; } - /** Passes the {@code recommendedFov} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrViewConfigurationViewFovEPIC recommendedFov(java.util.function.Consumer consumer) { consumer.accept(recommendedFov()); return this; } - /** Copies the specified {@link XrFovf} to the {@code maxMutableFov} field. */ - public XrViewConfigurationViewFovEPIC maxMutableFov(XrFovf value) { nmaxMutableFov(address(), value); return this; } - /** Passes the {@code maxMutableFov} field to the specified {@link java.util.function.Consumer Consumer}. */ - public XrViewConfigurationViewFovEPIC maxMutableFov(java.util.function.Consumer consumer) { consumer.accept(maxMutableFov()); return this; } - - /** Initializes this struct with the specified values. */ - public XrViewConfigurationViewFovEPIC set( - int type, - long next, - XrFovf recommendedFov, - XrFovf maxMutableFov - ) { - type(type); - next(next); - recommendedFov(recommendedFov); - maxMutableFov(maxMutableFov); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrViewConfigurationViewFovEPIC set(XrViewConfigurationViewFovEPIC src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrViewConfigurationViewFovEPIC} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrViewConfigurationViewFovEPIC malloc() { - return wrap(XrViewConfigurationViewFovEPIC.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrViewConfigurationViewFovEPIC} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrViewConfigurationViewFovEPIC calloc() { - return wrap(XrViewConfigurationViewFovEPIC.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrViewConfigurationViewFovEPIC} instance allocated with {@link BufferUtils}. */ - public static XrViewConfigurationViewFovEPIC create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrViewConfigurationViewFovEPIC.class, memAddress(container), container); - } - - /** Returns a new {@code XrViewConfigurationViewFovEPIC} instance for the specified memory address. */ - public static XrViewConfigurationViewFovEPIC create(long address) { - return wrap(XrViewConfigurationViewFovEPIC.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrViewConfigurationViewFovEPIC createSafe(long address) { - return address == NULL ? null : wrap(XrViewConfigurationViewFovEPIC.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrViewConfigurationViewFovEPIC.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrViewConfigurationViewFovEPIC} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrViewConfigurationViewFovEPIC malloc(MemoryStack stack) { - return wrap(XrViewConfigurationViewFovEPIC.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrViewConfigurationViewFovEPIC} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrViewConfigurationViewFovEPIC calloc(MemoryStack stack) { - return wrap(XrViewConfigurationViewFovEPIC.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrViewConfigurationViewFovEPIC.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrViewConfigurationViewFovEPIC.NEXT); } - /** Unsafe version of {@link #recommendedFov}. */ - public static XrFovf nrecommendedFov(long struct) { return XrFovf.create(struct + XrViewConfigurationViewFovEPIC.RECOMMENDEDFOV); } - /** Unsafe version of {@link #maxMutableFov}. */ - public static XrFovf nmaxMutableFov(long struct) { return XrFovf.create(struct + XrViewConfigurationViewFovEPIC.MAXMUTABLEFOV); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrViewConfigurationViewFovEPIC.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrViewConfigurationViewFovEPIC.NEXT, value); } - /** Unsafe version of {@link #recommendedFov(XrFovf) recommendedFov}. */ - public static void nrecommendedFov(long struct, XrFovf value) { memCopy(value.address(), struct + XrViewConfigurationViewFovEPIC.RECOMMENDEDFOV, XrFovf.SIZEOF); } - /** Unsafe version of {@link #maxMutableFov(XrFovf) maxMutableFov}. */ - public static void nmaxMutableFov(long struct, XrFovf value) { memCopy(value.address(), struct + XrViewConfigurationViewFovEPIC.MAXMUTABLEFOV, XrFovf.SIZEOF); } - - // ----------------------------------- - - /** An array of {@link XrViewConfigurationViewFovEPIC} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrViewConfigurationViewFovEPIC ELEMENT_FACTORY = XrViewConfigurationViewFovEPIC.create(-1L); - - /** - * Creates a new {@code XrViewConfigurationViewFovEPIC.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrViewConfigurationViewFovEPIC#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrViewConfigurationViewFovEPIC getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrViewConfigurationViewFovEPIC.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrViewConfigurationViewFovEPIC.nnext(address()); } - /** @return a {@link XrFovf} view of the {@code recommendedFov} field. */ - public XrFovf recommendedFov() { return XrViewConfigurationViewFovEPIC.nrecommendedFov(address()); } - /** @return a {@link XrFovf} view of the {@code maxMutableFov} field. */ - public XrFovf maxMutableFov() { return XrViewConfigurationViewFovEPIC.nmaxMutableFov(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrViewConfigurationViewFovEPIC.ntype(address(), value); return this; } - /** Sets the {@link EPICViewConfigurationFov#XR_TYPE_VIEW_CONFIGURATION_VIEW_FOV_EPIC TYPE_VIEW_CONFIGURATION_VIEW_FOV_EPIC} value to the {@code type} field. */ - public Buffer type$Default() { return type(EPICViewConfigurationFov.XR_TYPE_VIEW_CONFIGURATION_VIEW_FOV_EPIC); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrViewConfigurationViewFovEPIC.nnext(address(), value); return this; } - /** Copies the specified {@link XrFovf} to the {@code recommendedFov} field. */ - public Buffer recommendedFov(XrFovf value) { XrViewConfigurationViewFovEPIC.nrecommendedFov(address(), value); return this; } - /** Passes the {@code recommendedFov} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer recommendedFov(java.util.function.Consumer consumer) { consumer.accept(recommendedFov()); return this; } - /** Copies the specified {@link XrFovf} to the {@code maxMutableFov} field. */ - public Buffer maxMutableFov(XrFovf value) { XrViewConfigurationViewFovEPIC.nmaxMutableFov(address(), value); return this; } - /** Passes the {@code maxMutableFov} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer maxMutableFov(java.util.function.Consumer consumer) { consumer.accept(maxMutableFov()); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrViewLocateFoveatedRenderingVARJO.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrViewLocateFoveatedRenderingVARJO.java deleted file mode 100644 index 59574f54..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrViewLocateFoveatedRenderingVARJO.java +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrViewLocateFoveatedRenderingVARJO {
- *     XrStructureType type;
- *     void const * next;
- *     XrBool32 foveatedRenderingActive;
- * }
- */ -public class XrViewLocateFoveatedRenderingVARJO extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - FOVEATEDRENDERINGACTIVE; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - FOVEATEDRENDERINGACTIVE = layout.offsetof(2); - } - - /** - * Creates a {@code XrViewLocateFoveatedRenderingVARJO} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrViewLocateFoveatedRenderingVARJO(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code foveatedRenderingActive} field. */ - @NativeType("XrBool32") - public boolean foveatedRenderingActive() { return nfoveatedRenderingActive(address()) != 0; } - - /** Sets the specified value to the {@code type} field. */ - public XrViewLocateFoveatedRenderingVARJO type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link VARJOFoveatedRendering#XR_TYPE_VIEW_LOCATE_FOVEATED_RENDERING_VARJO TYPE_VIEW_LOCATE_FOVEATED_RENDERING_VARJO} value to the {@code type} field. */ - public XrViewLocateFoveatedRenderingVARJO type$Default() { return type(VARJOFoveatedRendering.XR_TYPE_VIEW_LOCATE_FOVEATED_RENDERING_VARJO); } - /** Sets the specified value to the {@code next} field. */ - public XrViewLocateFoveatedRenderingVARJO next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code foveatedRenderingActive} field. */ - public XrViewLocateFoveatedRenderingVARJO foveatedRenderingActive(@NativeType("XrBool32") boolean value) { nfoveatedRenderingActive(address(), value ? 1 : 0); return this; } - - /** Initializes this struct with the specified values. */ - public XrViewLocateFoveatedRenderingVARJO set( - int type, - long next, - boolean foveatedRenderingActive - ) { - type(type); - next(next); - foveatedRenderingActive(foveatedRenderingActive); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrViewLocateFoveatedRenderingVARJO set(XrViewLocateFoveatedRenderingVARJO src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrViewLocateFoveatedRenderingVARJO} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrViewLocateFoveatedRenderingVARJO malloc() { - return wrap(XrViewLocateFoveatedRenderingVARJO.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrViewLocateFoveatedRenderingVARJO} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrViewLocateFoveatedRenderingVARJO calloc() { - return wrap(XrViewLocateFoveatedRenderingVARJO.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrViewLocateFoveatedRenderingVARJO} instance allocated with {@link BufferUtils}. */ - public static XrViewLocateFoveatedRenderingVARJO create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrViewLocateFoveatedRenderingVARJO.class, memAddress(container), container); - } - - /** Returns a new {@code XrViewLocateFoveatedRenderingVARJO} instance for the specified memory address. */ - public static XrViewLocateFoveatedRenderingVARJO create(long address) { - return wrap(XrViewLocateFoveatedRenderingVARJO.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrViewLocateFoveatedRenderingVARJO createSafe(long address) { - return address == NULL ? null : wrap(XrViewLocateFoveatedRenderingVARJO.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrViewLocateFoveatedRenderingVARJO.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrViewLocateFoveatedRenderingVARJO} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrViewLocateFoveatedRenderingVARJO malloc(MemoryStack stack) { - return wrap(XrViewLocateFoveatedRenderingVARJO.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrViewLocateFoveatedRenderingVARJO} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrViewLocateFoveatedRenderingVARJO calloc(MemoryStack stack) { - return wrap(XrViewLocateFoveatedRenderingVARJO.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrViewLocateFoveatedRenderingVARJO.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrViewLocateFoveatedRenderingVARJO.NEXT); } - /** Unsafe version of {@link #foveatedRenderingActive}. */ - public static int nfoveatedRenderingActive(long struct) { return UNSAFE.getInt(null, struct + XrViewLocateFoveatedRenderingVARJO.FOVEATEDRENDERINGACTIVE); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrViewLocateFoveatedRenderingVARJO.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrViewLocateFoveatedRenderingVARJO.NEXT, value); } - /** Unsafe version of {@link #foveatedRenderingActive(boolean) foveatedRenderingActive}. */ - public static void nfoveatedRenderingActive(long struct, int value) { UNSAFE.putInt(null, struct + XrViewLocateFoveatedRenderingVARJO.FOVEATEDRENDERINGACTIVE, value); } - - // ----------------------------------- - - /** An array of {@link XrViewLocateFoveatedRenderingVARJO} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrViewLocateFoveatedRenderingVARJO ELEMENT_FACTORY = XrViewLocateFoveatedRenderingVARJO.create(-1L); - - /** - * Creates a new {@code XrViewLocateFoveatedRenderingVARJO.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrViewLocateFoveatedRenderingVARJO#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrViewLocateFoveatedRenderingVARJO getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrViewLocateFoveatedRenderingVARJO.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrViewLocateFoveatedRenderingVARJO.nnext(address()); } - /** @return the value of the {@code foveatedRenderingActive} field. */ - @NativeType("XrBool32") - public boolean foveatedRenderingActive() { return XrViewLocateFoveatedRenderingVARJO.nfoveatedRenderingActive(address()) != 0; } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrViewLocateFoveatedRenderingVARJO.ntype(address(), value); return this; } - /** Sets the {@link VARJOFoveatedRendering#XR_TYPE_VIEW_LOCATE_FOVEATED_RENDERING_VARJO TYPE_VIEW_LOCATE_FOVEATED_RENDERING_VARJO} value to the {@code type} field. */ - public Buffer type$Default() { return type(VARJOFoveatedRendering.XR_TYPE_VIEW_LOCATE_FOVEATED_RENDERING_VARJO); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrViewLocateFoveatedRenderingVARJO.nnext(address(), value); return this; } - /** Sets the specified value to the {@code foveatedRenderingActive} field. */ - public Buffer foveatedRenderingActive(@NativeType("XrBool32") boolean value) { XrViewLocateFoveatedRenderingVARJO.nfoveatedRenderingActive(address(), value ? 1 : 0); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrViewLocateInfo.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrViewLocateInfo.java deleted file mode 100644 index 0e1bf957..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrViewLocateInfo.java +++ /dev/null @@ -1,361 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.Checks.check; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrViewLocateInfo {
- *     XrStructureType type;
- *     void const * next;
- *     XrViewConfigurationType viewConfigurationType;
- *     XrTime displayTime;
- *     XrSpace space;
- * }
- */ -public class XrViewLocateInfo extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - VIEWCONFIGURATIONTYPE, - DISPLAYTIME, - SPACE; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(8), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - VIEWCONFIGURATIONTYPE = layout.offsetof(2); - DISPLAYTIME = layout.offsetof(3); - SPACE = layout.offsetof(4); - } - - /** - * Creates a {@code XrViewLocateInfo} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrViewLocateInfo(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code viewConfigurationType} field. */ - @NativeType("XrViewConfigurationType") - public int viewConfigurationType() { return nviewConfigurationType(address()); } - /** @return the value of the {@code displayTime} field. */ - @NativeType("XrTime") - public long displayTime() { return ndisplayTime(address()); } - /** @return the value of the {@code space} field. */ - @NativeType("XrSpace") - public long space() { return nspace(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrViewLocateInfo type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_VIEW_LOCATE_INFO TYPE_VIEW_LOCATE_INFO} value to the {@code type} field. */ - public XrViewLocateInfo type$Default() { return type(XR10.XR_TYPE_VIEW_LOCATE_INFO); } - /** Sets the specified value to the {@code next} field. */ - public XrViewLocateInfo next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code viewConfigurationType} field. */ - public XrViewLocateInfo viewConfigurationType(@NativeType("XrViewConfigurationType") int value) { nviewConfigurationType(address(), value); return this; } - /** Sets the specified value to the {@code displayTime} field. */ - public XrViewLocateInfo displayTime(@NativeType("XrTime") long value) { ndisplayTime(address(), value); return this; } - /** Sets the specified value to the {@code space} field. */ - public XrViewLocateInfo space(XrSpace value) { nspace(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrViewLocateInfo set( - int type, - long next, - int viewConfigurationType, - long displayTime, - XrSpace space - ) { - type(type); - next(next); - viewConfigurationType(viewConfigurationType); - displayTime(displayTime); - space(space); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrViewLocateInfo set(XrViewLocateInfo src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrViewLocateInfo} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrViewLocateInfo malloc() { - return wrap(XrViewLocateInfo.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrViewLocateInfo} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrViewLocateInfo calloc() { - return wrap(XrViewLocateInfo.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrViewLocateInfo} instance allocated with {@link BufferUtils}. */ - public static XrViewLocateInfo create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrViewLocateInfo.class, memAddress(container), container); - } - - /** Returns a new {@code XrViewLocateInfo} instance for the specified memory address. */ - public static XrViewLocateInfo create(long address) { - return wrap(XrViewLocateInfo.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrViewLocateInfo createSafe(long address) { - return address == NULL ? null : wrap(XrViewLocateInfo.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrViewLocateInfo.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrViewLocateInfo} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrViewLocateInfo malloc(MemoryStack stack) { - return wrap(XrViewLocateInfo.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrViewLocateInfo} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrViewLocateInfo calloc(MemoryStack stack) { - return wrap(XrViewLocateInfo.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrViewLocateInfo.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrViewLocateInfo.NEXT); } - /** Unsafe version of {@link #viewConfigurationType}. */ - public static int nviewConfigurationType(long struct) { return UNSAFE.getInt(null, struct + XrViewLocateInfo.VIEWCONFIGURATIONTYPE); } - /** Unsafe version of {@link #displayTime}. */ - public static long ndisplayTime(long struct) { return UNSAFE.getLong(null, struct + XrViewLocateInfo.DISPLAYTIME); } - /** Unsafe version of {@link #space}. */ - public static long nspace(long struct) { return memGetAddress(struct + XrViewLocateInfo.SPACE); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrViewLocateInfo.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrViewLocateInfo.NEXT, value); } - /** Unsafe version of {@link #viewConfigurationType(int) viewConfigurationType}. */ - public static void nviewConfigurationType(long struct, int value) { UNSAFE.putInt(null, struct + XrViewLocateInfo.VIEWCONFIGURATIONTYPE, value); } - /** Unsafe version of {@link #displayTime(long) displayTime}. */ - public static void ndisplayTime(long struct, long value) { UNSAFE.putLong(null, struct + XrViewLocateInfo.DISPLAYTIME, value); } - /** Unsafe version of {@link #space(XrSpace) space}. */ - public static void nspace(long struct, XrSpace value) { memPutAddress(struct + XrViewLocateInfo.SPACE, value.address()); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XrViewLocateInfo.SPACE)); - } - - /** - * Calls {@link #validate(long)} for each struct contained in the specified struct array. - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - */ - public static void validate(long array, int count) { - for (int i = 0; i < count; i++) { - validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ----------------------------------- - - /** An array of {@link XrViewLocateInfo} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrViewLocateInfo ELEMENT_FACTORY = XrViewLocateInfo.create(-1L); - - /** - * Creates a new {@code XrViewLocateInfo.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrViewLocateInfo#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrViewLocateInfo getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrViewLocateInfo.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrViewLocateInfo.nnext(address()); } - /** @return the value of the {@code viewConfigurationType} field. */ - @NativeType("XrViewConfigurationType") - public int viewConfigurationType() { return XrViewLocateInfo.nviewConfigurationType(address()); } - /** @return the value of the {@code displayTime} field. */ - @NativeType("XrTime") - public long displayTime() { return XrViewLocateInfo.ndisplayTime(address()); } - /** @return the value of the {@code space} field. */ - @NativeType("XrSpace") - public long space() { return XrViewLocateInfo.nspace(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrViewLocateInfo.ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_VIEW_LOCATE_INFO TYPE_VIEW_LOCATE_INFO} value to the {@code type} field. */ - public Buffer type$Default() { return type(XR10.XR_TYPE_VIEW_LOCATE_INFO); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrViewLocateInfo.nnext(address(), value); return this; } - /** Sets the specified value to the {@code viewConfigurationType} field. */ - public Buffer viewConfigurationType(@NativeType("XrViewConfigurationType") int value) { XrViewLocateInfo.nviewConfigurationType(address(), value); return this; } - /** Sets the specified value to the {@code displayTime} field. */ - public Buffer displayTime(@NativeType("XrTime") long value) { XrViewLocateInfo.ndisplayTime(address(), value); return this; } - /** Sets the specified value to the {@code space} field. */ - public Buffer space(XrSpace value) { XrViewLocateInfo.nspace(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrViewState.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrViewState.java deleted file mode 100644 index c2f15076..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrViewState.java +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrViewState {
- *     XrStructureType type;
- *     void * next;
- *     XrViewStateFlags viewStateFlags;
- * }
- */ -public class XrViewState extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - VIEWSTATEFLAGS; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(8) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - VIEWSTATEFLAGS = layout.offsetof(2); - } - - /** - * Creates a {@code XrViewState} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrViewState(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return the value of the {@code viewStateFlags} field. */ - @NativeType("XrViewStateFlags") - public long viewStateFlags() { return nviewStateFlags(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrViewState type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_VIEW_STATE TYPE_VIEW_STATE} value to the {@code type} field. */ - public XrViewState type$Default() { return type(XR10.XR_TYPE_VIEW_STATE); } - /** Sets the specified value to the {@code next} field. */ - public XrViewState next(@NativeType("void *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code viewStateFlags} field. */ - public XrViewState viewStateFlags(@NativeType("XrViewStateFlags") long value) { nviewStateFlags(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrViewState set( - int type, - long next, - long viewStateFlags - ) { - type(type); - next(next); - viewStateFlags(viewStateFlags); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrViewState set(XrViewState src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrViewState} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrViewState malloc() { - return wrap(XrViewState.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrViewState} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrViewState calloc() { - return wrap(XrViewState.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrViewState} instance allocated with {@link BufferUtils}. */ - public static XrViewState create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrViewState.class, memAddress(container), container); - } - - /** Returns a new {@code XrViewState} instance for the specified memory address. */ - public static XrViewState create(long address) { - return wrap(XrViewState.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrViewState createSafe(long address) { - return address == NULL ? null : wrap(XrViewState.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrViewState.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrViewState} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrViewState malloc(MemoryStack stack) { - return wrap(XrViewState.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrViewState} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrViewState calloc(MemoryStack stack) { - return wrap(XrViewState.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrViewState.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrViewState.NEXT); } - /** Unsafe version of {@link #viewStateFlags}. */ - public static long nviewStateFlags(long struct) { return UNSAFE.getLong(null, struct + XrViewState.VIEWSTATEFLAGS); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrViewState.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrViewState.NEXT, value); } - /** Unsafe version of {@link #viewStateFlags(long) viewStateFlags}. */ - public static void nviewStateFlags(long struct, long value) { UNSAFE.putLong(null, struct + XrViewState.VIEWSTATEFLAGS, value); } - - // ----------------------------------- - - /** An array of {@link XrViewState} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrViewState ELEMENT_FACTORY = XrViewState.create(-1L); - - /** - * Creates a new {@code XrViewState.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrViewState#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrViewState getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrViewState.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrViewState.nnext(address()); } - /** @return the value of the {@code viewStateFlags} field. */ - @NativeType("XrViewStateFlags") - public long viewStateFlags() { return XrViewState.nviewStateFlags(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrViewState.ntype(address(), value); return this; } - /** Sets the {@link XR10#XR_TYPE_VIEW_STATE TYPE_VIEW_STATE} value to the {@code type} field. */ - public Buffer type$Default() { return type(XR10.XR_TYPE_VIEW_STATE); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrViewState.nnext(address(), value); return this; } - /** Sets the specified value to the {@code viewStateFlags} field. */ - public Buffer viewStateFlags(@NativeType("XrViewStateFlags") long value) { XrViewState.nviewStateFlags(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrVisibilityMaskKHR.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrVisibilityMaskKHR.java deleted file mode 100644 index e13cef5e..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrVisibilityMaskKHR.java +++ /dev/null @@ -1,404 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; -import java.nio.IntBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrVisibilityMaskKHR {
- *     XrStructureType type;
- *     void * next;
- *     uint32_t vertexCapacityInput;
- *     uint32_t vertexCountOutput;
- *     {@link XrVector2f XrVector2f} * vertices;
- *     uint32_t indexCapacityInput;
- *     uint32_t indexCountOutput;
- *     uint32_t * indices;
- * }
- */ -public class XrVisibilityMaskKHR extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - VERTEXCAPACITYINPUT, - VERTEXCOUNTOUTPUT, - VERTICES, - INDEXCAPACITYINPUT, - INDEXCOUNTOUTPUT, - INDICES; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - VERTEXCAPACITYINPUT = layout.offsetof(2); - VERTEXCOUNTOUTPUT = layout.offsetof(3); - VERTICES = layout.offsetof(4); - INDEXCAPACITYINPUT = layout.offsetof(5); - INDEXCOUNTOUTPUT = layout.offsetof(6); - INDICES = layout.offsetof(7); - } - - /** - * Creates a {@code XrVisibilityMaskKHR} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrVisibilityMaskKHR(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return the value of the {@code vertexCapacityInput} field. */ - @NativeType("uint32_t") - public int vertexCapacityInput() { return nvertexCapacityInput(address()); } - /** @return the value of the {@code vertexCountOutput} field. */ - @NativeType("uint32_t") - public int vertexCountOutput() { return nvertexCountOutput(address()); } - /** @return a {@link XrVector2f.Buffer} view of the struct array pointed to by the {@code vertices} field. */ - @Nullable - @NativeType("XrVector2f *") - public XrVector2f.Buffer vertices() { return nvertices(address()); } - /** @return the value of the {@code indexCapacityInput} field. */ - @NativeType("uint32_t") - public int indexCapacityInput() { return nindexCapacityInput(address()); } - /** @return the value of the {@code indexCountOutput} field. */ - @NativeType("uint32_t") - public int indexCountOutput() { return nindexCountOutput(address()); } - /** @return a {@link IntBuffer} view of the data pointed to by the {@code indices} field. */ - @Nullable - @NativeType("uint32_t *") - public IntBuffer indices() { return nindices(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrVisibilityMaskKHR type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link KHRVisibilityMask#XR_TYPE_VISIBILITY_MASK_KHR TYPE_VISIBILITY_MASK_KHR} value to the {@code type} field. */ - public XrVisibilityMaskKHR type$Default() { return type(KHRVisibilityMask.XR_TYPE_VISIBILITY_MASK_KHR); } - /** Sets the specified value to the {@code next} field. */ - public XrVisibilityMaskKHR next(@NativeType("void *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code vertexCapacityInput} field. */ - public XrVisibilityMaskKHR vertexCapacityInput(@NativeType("uint32_t") int value) { nvertexCapacityInput(address(), value); return this; } - /** Sets the specified value to the {@code vertexCountOutput} field. */ - public XrVisibilityMaskKHR vertexCountOutput(@NativeType("uint32_t") int value) { nvertexCountOutput(address(), value); return this; } - /** Sets the address of the specified {@link XrVector2f.Buffer} to the {@code vertices} field. */ - public XrVisibilityMaskKHR vertices(@Nullable @NativeType("XrVector2f *") XrVector2f.Buffer value) { nvertices(address(), value); return this; } - /** Sets the specified value to the {@code indexCapacityInput} field. */ - public XrVisibilityMaskKHR indexCapacityInput(@NativeType("uint32_t") int value) { nindexCapacityInput(address(), value); return this; } - /** Sets the specified value to the {@code indexCountOutput} field. */ - public XrVisibilityMaskKHR indexCountOutput(@NativeType("uint32_t") int value) { nindexCountOutput(address(), value); return this; } - /** Sets the address of the specified {@link IntBuffer} to the {@code indices} field. */ - public XrVisibilityMaskKHR indices(@Nullable @NativeType("uint32_t *") IntBuffer value) { nindices(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrVisibilityMaskKHR set( - int type, - long next, - int vertexCapacityInput, - int vertexCountOutput, - @Nullable XrVector2f.Buffer vertices, - int indexCapacityInput, - int indexCountOutput, - @Nullable IntBuffer indices - ) { - type(type); - next(next); - vertexCapacityInput(vertexCapacityInput); - vertexCountOutput(vertexCountOutput); - vertices(vertices); - indexCapacityInput(indexCapacityInput); - indexCountOutput(indexCountOutput); - indices(indices); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrVisibilityMaskKHR set(XrVisibilityMaskKHR src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrVisibilityMaskKHR} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrVisibilityMaskKHR malloc() { - return wrap(XrVisibilityMaskKHR.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrVisibilityMaskKHR} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrVisibilityMaskKHR calloc() { - return wrap(XrVisibilityMaskKHR.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrVisibilityMaskKHR} instance allocated with {@link BufferUtils}. */ - public static XrVisibilityMaskKHR create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrVisibilityMaskKHR.class, memAddress(container), container); - } - - /** Returns a new {@code XrVisibilityMaskKHR} instance for the specified memory address. */ - public static XrVisibilityMaskKHR create(long address) { - return wrap(XrVisibilityMaskKHR.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrVisibilityMaskKHR createSafe(long address) { - return address == NULL ? null : wrap(XrVisibilityMaskKHR.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrVisibilityMaskKHR.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrVisibilityMaskKHR} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrVisibilityMaskKHR malloc(MemoryStack stack) { - return wrap(XrVisibilityMaskKHR.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrVisibilityMaskKHR} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrVisibilityMaskKHR calloc(MemoryStack stack) { - return wrap(XrVisibilityMaskKHR.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrVisibilityMaskKHR.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrVisibilityMaskKHR.NEXT); } - /** Unsafe version of {@link #vertexCapacityInput}. */ - public static int nvertexCapacityInput(long struct) { return UNSAFE.getInt(null, struct + XrVisibilityMaskKHR.VERTEXCAPACITYINPUT); } - /** Unsafe version of {@link #vertexCountOutput}. */ - public static int nvertexCountOutput(long struct) { return UNSAFE.getInt(null, struct + XrVisibilityMaskKHR.VERTEXCOUNTOUTPUT); } - /** Unsafe version of {@link #vertices}. */ - @Nullable public static XrVector2f.Buffer nvertices(long struct) { return XrVector2f.createSafe(memGetAddress(struct + XrVisibilityMaskKHR.VERTICES), nvertexCapacityInput(struct)); } - /** Unsafe version of {@link #indexCapacityInput}. */ - public static int nindexCapacityInput(long struct) { return UNSAFE.getInt(null, struct + XrVisibilityMaskKHR.INDEXCAPACITYINPUT); } - /** Unsafe version of {@link #indexCountOutput}. */ - public static int nindexCountOutput(long struct) { return UNSAFE.getInt(null, struct + XrVisibilityMaskKHR.INDEXCOUNTOUTPUT); } - /** Unsafe version of {@link #indices() indices}. */ - @Nullable public static IntBuffer nindices(long struct) { return memIntBufferSafe(memGetAddress(struct + XrVisibilityMaskKHR.INDICES), nindexCapacityInput(struct)); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrVisibilityMaskKHR.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrVisibilityMaskKHR.NEXT, value); } - /** Sets the specified value to the {@code vertexCapacityInput} field of the specified {@code struct}. */ - public static void nvertexCapacityInput(long struct, int value) { UNSAFE.putInt(null, struct + XrVisibilityMaskKHR.VERTEXCAPACITYINPUT, value); } - /** Unsafe version of {@link #vertexCountOutput(int) vertexCountOutput}. */ - public static void nvertexCountOutput(long struct, int value) { UNSAFE.putInt(null, struct + XrVisibilityMaskKHR.VERTEXCOUNTOUTPUT, value); } - /** Unsafe version of {@link #vertices(XrVector2f.Buffer) vertices}. */ - public static void nvertices(long struct, @Nullable XrVector2f.Buffer value) { memPutAddress(struct + XrVisibilityMaskKHR.VERTICES, memAddressSafe(value)); if (value != null) { nvertexCapacityInput(struct, value.remaining()); } } - /** Sets the specified value to the {@code indexCapacityInput} field of the specified {@code struct}. */ - public static void nindexCapacityInput(long struct, int value) { UNSAFE.putInt(null, struct + XrVisibilityMaskKHR.INDEXCAPACITYINPUT, value); } - /** Unsafe version of {@link #indexCountOutput(int) indexCountOutput}. */ - public static void nindexCountOutput(long struct, int value) { UNSAFE.putInt(null, struct + XrVisibilityMaskKHR.INDEXCOUNTOUTPUT, value); } - /** Unsafe version of {@link #indices(IntBuffer) indices}. */ - public static void nindices(long struct, @Nullable IntBuffer value) { memPutAddress(struct + XrVisibilityMaskKHR.INDICES, memAddressSafe(value)); if (value != null) { nindexCapacityInput(struct, value.remaining()); } } - - // ----------------------------------- - - /** An array of {@link XrVisibilityMaskKHR} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrVisibilityMaskKHR ELEMENT_FACTORY = XrVisibilityMaskKHR.create(-1L); - - /** - * Creates a new {@code XrVisibilityMaskKHR.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrVisibilityMaskKHR#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrVisibilityMaskKHR getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrVisibilityMaskKHR.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrVisibilityMaskKHR.nnext(address()); } - /** @return the value of the {@code vertexCapacityInput} field. */ - @NativeType("uint32_t") - public int vertexCapacityInput() { return XrVisibilityMaskKHR.nvertexCapacityInput(address()); } - /** @return the value of the {@code vertexCountOutput} field. */ - @NativeType("uint32_t") - public int vertexCountOutput() { return XrVisibilityMaskKHR.nvertexCountOutput(address()); } - /** @return a {@link XrVector2f.Buffer} view of the struct array pointed to by the {@code vertices} field. */ - @Nullable - @NativeType("XrVector2f *") - public XrVector2f.Buffer vertices() { return XrVisibilityMaskKHR.nvertices(address()); } - /** @return the value of the {@code indexCapacityInput} field. */ - @NativeType("uint32_t") - public int indexCapacityInput() { return XrVisibilityMaskKHR.nindexCapacityInput(address()); } - /** @return the value of the {@code indexCountOutput} field. */ - @NativeType("uint32_t") - public int indexCountOutput() { return XrVisibilityMaskKHR.nindexCountOutput(address()); } - /** @return a {@link IntBuffer} view of the data pointed to by the {@code indices} field. */ - @Nullable - @NativeType("uint32_t *") - public IntBuffer indices() { return XrVisibilityMaskKHR.nindices(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrVisibilityMaskKHR.ntype(address(), value); return this; } - /** Sets the {@link KHRVisibilityMask#XR_TYPE_VISIBILITY_MASK_KHR TYPE_VISIBILITY_MASK_KHR} value to the {@code type} field. */ - public Buffer type$Default() { return type(KHRVisibilityMask.XR_TYPE_VISIBILITY_MASK_KHR); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrVisibilityMaskKHR.nnext(address(), value); return this; } - /** Sets the specified value to the {@code vertexCapacityInput} field. */ - public Buffer vertexCapacityInput(@NativeType("uint32_t") int value) { XrVisibilityMaskKHR.nvertexCapacityInput(address(), value); return this; } - /** Sets the specified value to the {@code vertexCountOutput} field. */ - public Buffer vertexCountOutput(@NativeType("uint32_t") int value) { XrVisibilityMaskKHR.nvertexCountOutput(address(), value); return this; } - /** Sets the address of the specified {@link XrVector2f.Buffer} to the {@code vertices} field. */ - public Buffer vertices(@Nullable @NativeType("XrVector2f *") XrVector2f.Buffer value) { XrVisibilityMaskKHR.nvertices(address(), value); return this; } - /** Sets the specified value to the {@code indexCapacityInput} field. */ - public Buffer indexCapacityInput(@NativeType("uint32_t") int value) { XrVisibilityMaskKHR.nindexCapacityInput(address(), value); return this; } - /** Sets the specified value to the {@code indexCountOutput} field. */ - public Buffer indexCountOutput(@NativeType("uint32_t") int value) { XrVisibilityMaskKHR.nindexCountOutput(address(), value); return this; } - /** Sets the address of the specified {@link IntBuffer} to the {@code indices} field. */ - public Buffer indices(@Nullable @NativeType("uint32_t *") IntBuffer value) { XrVisibilityMaskKHR.nindices(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrVisualMeshComputeLodInfoMSFT.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrVisualMeshComputeLodInfoMSFT.java deleted file mode 100644 index c3acec05..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrVisualMeshComputeLodInfoMSFT.java +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrVisualMeshComputeLodInfoMSFT {
- *     XrStructureType type;
- *     void const * next;
- *     XrMeshComputeLodMSFT lod;
- * }
- */ -public class XrVisualMeshComputeLodInfoMSFT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - LOD; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - LOD = layout.offsetof(2); - } - - /** - * Creates a {@code XrVisualMeshComputeLodInfoMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrVisualMeshComputeLodInfoMSFT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return nnext(address()); } - /** @return the value of the {@code lod} field. */ - @NativeType("XrMeshComputeLodMSFT") - public int lod() { return nlod(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrVisualMeshComputeLodInfoMSFT type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link MSFTSceneUnderstanding#XR_TYPE_VISUAL_MESH_COMPUTE_LOD_INFO_MSFT TYPE_VISUAL_MESH_COMPUTE_LOD_INFO_MSFT} value to the {@code type} field. */ - public XrVisualMeshComputeLodInfoMSFT type$Default() { return type(MSFTSceneUnderstanding.XR_TYPE_VISUAL_MESH_COMPUTE_LOD_INFO_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public XrVisualMeshComputeLodInfoMSFT next(@NativeType("void const *") long value) { nnext(address(), value); return this; } - /** Sets the specified value to the {@code lod} field. */ - public XrVisualMeshComputeLodInfoMSFT lod(@NativeType("XrMeshComputeLodMSFT") int value) { nlod(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrVisualMeshComputeLodInfoMSFT set( - int type, - long next, - int lod - ) { - type(type); - next(next); - lod(lod); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrVisualMeshComputeLodInfoMSFT set(XrVisualMeshComputeLodInfoMSFT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrVisualMeshComputeLodInfoMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrVisualMeshComputeLodInfoMSFT malloc() { - return wrap(XrVisualMeshComputeLodInfoMSFT.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrVisualMeshComputeLodInfoMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrVisualMeshComputeLodInfoMSFT calloc() { - return wrap(XrVisualMeshComputeLodInfoMSFT.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrVisualMeshComputeLodInfoMSFT} instance allocated with {@link BufferUtils}. */ - public static XrVisualMeshComputeLodInfoMSFT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrVisualMeshComputeLodInfoMSFT.class, memAddress(container), container); - } - - /** Returns a new {@code XrVisualMeshComputeLodInfoMSFT} instance for the specified memory address. */ - public static XrVisualMeshComputeLodInfoMSFT create(long address) { - return wrap(XrVisualMeshComputeLodInfoMSFT.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrVisualMeshComputeLodInfoMSFT createSafe(long address) { - return address == NULL ? null : wrap(XrVisualMeshComputeLodInfoMSFT.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrVisualMeshComputeLodInfoMSFT.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrVisualMeshComputeLodInfoMSFT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrVisualMeshComputeLodInfoMSFT malloc(MemoryStack stack) { - return wrap(XrVisualMeshComputeLodInfoMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrVisualMeshComputeLodInfoMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrVisualMeshComputeLodInfoMSFT calloc(MemoryStack stack) { - return wrap(XrVisualMeshComputeLodInfoMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrVisualMeshComputeLodInfoMSFT.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrVisualMeshComputeLodInfoMSFT.NEXT); } - /** Unsafe version of {@link #lod}. */ - public static int nlod(long struct) { return UNSAFE.getInt(null, struct + XrVisualMeshComputeLodInfoMSFT.LOD); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrVisualMeshComputeLodInfoMSFT.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrVisualMeshComputeLodInfoMSFT.NEXT, value); } - /** Unsafe version of {@link #lod(int) lod}. */ - public static void nlod(long struct, int value) { UNSAFE.putInt(null, struct + XrVisualMeshComputeLodInfoMSFT.LOD, value); } - - // ----------------------------------- - - /** An array of {@link XrVisualMeshComputeLodInfoMSFT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrVisualMeshComputeLodInfoMSFT ELEMENT_FACTORY = XrVisualMeshComputeLodInfoMSFT.create(-1L); - - /** - * Creates a new {@code XrVisualMeshComputeLodInfoMSFT.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrVisualMeshComputeLodInfoMSFT#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrVisualMeshComputeLodInfoMSFT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrVisualMeshComputeLodInfoMSFT.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void const *") - public long next() { return XrVisualMeshComputeLodInfoMSFT.nnext(address()); } - /** @return the value of the {@code lod} field. */ - @NativeType("XrMeshComputeLodMSFT") - public int lod() { return XrVisualMeshComputeLodInfoMSFT.nlod(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrVisualMeshComputeLodInfoMSFT.ntype(address(), value); return this; } - /** Sets the {@link MSFTSceneUnderstanding#XR_TYPE_VISUAL_MESH_COMPUTE_LOD_INFO_MSFT TYPE_VISUAL_MESH_COMPUTE_LOD_INFO_MSFT} value to the {@code type} field. */ - public Buffer type$Default() { return type(MSFTSceneUnderstanding.XR_TYPE_VISUAL_MESH_COMPUTE_LOD_INFO_MSFT); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void const *") long value) { XrVisualMeshComputeLodInfoMSFT.nnext(address(), value); return this; } - /** Sets the specified value to the {@code lod} field. */ - public Buffer lod(@NativeType("XrMeshComputeLodMSFT") int value) { XrVisualMeshComputeLodInfoMSFT.nlod(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrViveTrackerPathsHTCX.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrViveTrackerPathsHTCX.java deleted file mode 100644 index 051d233e..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrViveTrackerPathsHTCX.java +++ /dev/null @@ -1,303 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.BufferUtils; -import org.lwjgl.system.*; - -import java.nio.ByteBuffer; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

Layout

- * - *

- * struct XrViveTrackerPathsHTCX {
- *     XrStructureType type;
- *     void * next;
- *     XrPath persistentPath;
- *     XrPath rolePath;
- * }
- */ -public class XrViveTrackerPathsHTCX extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - NEXT, - PERSISTENTPATH, - ROLEPATH; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(8), - __member(8) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - NEXT = layout.offsetof(1); - PERSISTENTPATH = layout.offsetof(2); - ROLEPATH = layout.offsetof(3); - } - - /** - * Creates a {@code XrViveTrackerPathsHTCX} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

The created instance holds a strong reference to the container object.

- */ - public XrViveTrackerPathsHTCX(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return nnext(address()); } - /** @return the value of the {@code persistentPath} field. */ - @NativeType("XrPath") - public long persistentPath() { return npersistentPath(address()); } - /** @return the value of the {@code rolePath} field. */ - @NativeType("XrPath") - public long rolePath() { return nrolePath(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XrViveTrackerPathsHTCX type(@NativeType("XrStructureType") int value) { ntype(address(), value); return this; } - /** Sets the {@link HTCXViveTrackerInteraction#XR_TYPE_VIVE_TRACKER_PATHS_HTCX TYPE_VIVE_TRACKER_PATHS_HTCX} value to the {@code type} field. */ - public XrViveTrackerPathsHTCX type$Default() { return type(HTCXViveTrackerInteraction.XR_TYPE_VIVE_TRACKER_PATHS_HTCX); } - /** Sets the specified value to the {@code next} field. */ - public XrViveTrackerPathsHTCX next(@NativeType("void *") long value) { nnext(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XrViveTrackerPathsHTCX set( - int type, - long next - ) { - type(type); - next(next); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XrViveTrackerPathsHTCX set(XrViveTrackerPathsHTCX src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XrViveTrackerPathsHTCX} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XrViveTrackerPathsHTCX malloc() { - return wrap(XrViveTrackerPathsHTCX.class, nmemAllocChecked(SIZEOF)); - } - - /** Returns a new {@code XrViveTrackerPathsHTCX} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XrViveTrackerPathsHTCX calloc() { - return wrap(XrViveTrackerPathsHTCX.class, nmemCallocChecked(1, SIZEOF)); - } - - /** Returns a new {@code XrViveTrackerPathsHTCX} instance allocated with {@link BufferUtils}. */ - public static XrViveTrackerPathsHTCX create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return wrap(XrViveTrackerPathsHTCX.class, memAddress(container), container); - } - - /** Returns a new {@code XrViveTrackerPathsHTCX} instance for the specified memory address. */ - public static XrViveTrackerPathsHTCX create(long address) { - return wrap(XrViveTrackerPathsHTCX.class, address); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrViveTrackerPathsHTCX createSafe(long address) { - return address == NULL ? null : wrap(XrViveTrackerPathsHTCX.class, address); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return wrap(Buffer.class, memAddress(container), capacity, container); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return wrap(Buffer.class, address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XrViveTrackerPathsHTCX.Buffer createSafe(long address, int capacity) { - return address == NULL ? null : wrap(Buffer.class, address, capacity); - } - - - /** - * Returns a new {@code XrViveTrackerPathsHTCX} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XrViveTrackerPathsHTCX malloc(MemoryStack stack) { - return wrap(XrViveTrackerPathsHTCX.class, stack.nmalloc(ALIGNOF, SIZEOF)); - } - - /** - * Returns a new {@code XrViveTrackerPathsHTCX} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XrViveTrackerPathsHTCX calloc(MemoryStack stack) { - return wrap(XrViveTrackerPathsHTCX.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XrViveTrackerPathsHTCX.TYPE); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + XrViveTrackerPathsHTCX.NEXT); } - /** Unsafe version of {@link #persistentPath}. */ - public static long npersistentPath(long struct) { return UNSAFE.getLong(null, struct + XrViveTrackerPathsHTCX.PERSISTENTPATH); } - /** Unsafe version of {@link #rolePath}. */ - public static long nrolePath(long struct) { return UNSAFE.getLong(null, struct + XrViveTrackerPathsHTCX.ROLEPATH); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XrViveTrackerPathsHTCX.TYPE, value); } - /** Unsafe version of {@link #next(long) next}. */ - public static void nnext(long struct, long value) { memPutAddress(struct + XrViveTrackerPathsHTCX.NEXT, value); } - - // ----------------------------------- - - /** An array of {@link XrViveTrackerPathsHTCX} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XrViveTrackerPathsHTCX ELEMENT_FACTORY = XrViveTrackerPathsHTCX.create(-1L); - - /** - * Creates a new {@code XrViveTrackerPathsHTCX.Buffer} instance backed by the specified container. - * - * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XrViveTrackerPathsHTCX#SIZEOF}, and its mark will be undefined. - * - *

The created buffer instance holds a strong reference to the container object.

- */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XrViveTrackerPathsHTCX getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("XrStructureType") - public int type() { return XrViveTrackerPathsHTCX.ntype(address()); } - /** @return the value of the {@code next} field. */ - @NativeType("void *") - public long next() { return XrViveTrackerPathsHTCX.nnext(address()); } - /** @return the value of the {@code persistentPath} field. */ - @NativeType("XrPath") - public long persistentPath() { return XrViveTrackerPathsHTCX.npersistentPath(address()); } - /** @return the value of the {@code rolePath} field. */ - @NativeType("XrPath") - public long rolePath() { return XrViveTrackerPathsHTCX.nrolePath(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("XrStructureType") int value) { XrViveTrackerPathsHTCX.ntype(address(), value); return this; } - /** Sets the {@link HTCXViveTrackerInteraction#XR_TYPE_VIVE_TRACKER_PATHS_HTCX TYPE_VIVE_TRACKER_PATHS_HTCX} value to the {@code type} field. */ - public Buffer type$Default() { return type(HTCXViveTrackerInteraction.XR_TYPE_VIVE_TRACKER_PATHS_HTCX); } - /** Sets the specified value to the {@code next} field. */ - public Buffer next(@NativeType("void *") long value) { XrViveTrackerPathsHTCX.nnext(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrVoidFunction.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrVoidFunction.java deleted file mode 100644 index 9d2d6ecd..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrVoidFunction.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable; -import org.lwjgl.system.Callback; - -import static org.lwjgl.system.MemoryUtil.NULL; - -public abstract class XrVoidFunction extends Callback implements XrVoidFunctionI { - - /** - * Creates a {@code XrVoidFunction} instance from the specified function pointer. - * - * @return the new {@code XrVoidFunction} - */ - public static XrVoidFunction create(long functionPointer) { - XrVoidFunctionI instance = Callback.get(functionPointer); - return instance instanceof XrVoidFunction - ? (XrVoidFunction)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static XrVoidFunction createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code XrVoidFunction} instance that delegates to the specified {@code XrVoidFunctionI} instance. */ - public static XrVoidFunction create(XrVoidFunctionI instance) { - return instance instanceof XrVoidFunction - ? (XrVoidFunction)instance - : new Container(instance.address(), instance); - } - - protected XrVoidFunction() { - super(SIGNATURE); - } - - XrVoidFunction(long functionPointer) { - super(functionPointer); - } - - private static final class Container extends XrVoidFunction { - - private final XrVoidFunctionI delegate; - - Container(long functionPointer, XrVoidFunctionI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public void invoke() { - delegate.invoke(); - } - - } - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/XrVoidFunctionI.java b/mcxr-play/src/main/java/org/lwjgl/openxr/XrVoidFunctionI.java deleted file mode 100644 index 7fcf0590..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/XrVoidFunctionI.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openxr; - -import org.lwjgl.system.Callback; -import org.lwjgl.system.CallbackI; -import org.lwjgl.system.NativeType; - -@FunctionalInterface -@NativeType("PFN_xrVoidFunction") -public interface XrVoidFunctionI extends CallbackI.V { - - String SIGNATURE = Callback.__stdcall("()v"); - - @Override - default String getSignature() { return SIGNATURE; } - - @Override - default void callback(long args) { - invoke(); - } - - void invoke(); - -} \ No newline at end of file diff --git a/mcxr-play/src/main/java/org/lwjgl/openxr/package-info.java b/mcxr-play/src/main/java/org/lwjgl/openxr/package-info.java deleted file mode 100644 index 5d85e223..00000000 --- a/mcxr-play/src/main/java/org/lwjgl/openxr/package-info.java +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ - -/** - * Contains bindings to OpenXR, a royalty-free, open standard that provides high-performance - * access to Augmented Reality (AR) and Virtual Reality (VR)—collectively known as XR—platforms and devices. - * - *

Not yet ready for release

- */ -@org.lwjgl.system.NonnullDefault -package org.lwjgl.openxr; - -import org.jetbrains.annotations.Nullable;