Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

Commit

Permalink
Merge removed stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
thejudge156 committed Jun 8, 2022
1 parent 57cba3f commit b4a5445
Show file tree
Hide file tree
Showing 321 changed files with 79,508 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ public class MCXROptionsScreen extends Screen {
@Nullable
private final Screen previous;

private Button reloadButton;

public MCXROptionsScreen(@Nullable Screen previous) {
super(Component.translatable("mcxr.options.title"));
this.previous = previous;
Expand Down Expand Up @@ -87,21 +85,7 @@ protected void init() {
button.setMessage(PlayOptions.smoothTurning ? Component.translatable("mcxr.options.enable_snap_turning") : Component.translatable("mcxr.options.enable_smooth_turning"));
}));


this.addRenderableWidget(new Button(
this.width / 2 - 155 + 160,
this.height / 6 + 54 + 24 + 12,
150,
20,
PlayOptions.smoothTurning ? Component.translatable("mcxr.options.enable_snap_turning") : Component.translatable("mcxr.options.enable_smooth_turning"),
button -> {
PlayOptions.smoothTurning = !PlayOptions.smoothTurning;
PlayOptions.save();
button.setMessage(PlayOptions.smoothTurning ? Component.translatable("mcxr.options.enable_snap_turning") : Component.translatable("mcxr.options.enable_smooth_turning"));
}));

if (true ||
MCXRPlayClient.MCXR_GAME_RENDERER.isXrMode() &&
if (MCXRPlayClient.MCXR_GAME_RENDERER.isXrMode() &&
(XrInput.vanillaGameplayActionSet.indexTrackpadRight.isActive || XrInput.vanillaGameplayActionSet.indexTrackpadLeft.isActive)) {
this.addRenderableWidget(new Button(
this.width / 2 - 155 + 160,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ public static int getMainHand() {

@Override
public void onInitializeClient() {
Configuration.OPENXR_EXPLICIT_INIT.set(true);
PlayOptions.init();
PlayOptions.load();
PlayOptions.save();
Expand Down
23 changes: 23 additions & 0 deletions mcxr-play/src/main/java/org/lwjgl/openxr/DispatchableHandle.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* 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;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* Copyright LWJGL. All 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() {}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
/*
* Copyright LWJGL. All 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());
}

}
191 changes: 191 additions & 0 deletions mcxr-play/src/main/java/org/lwjgl/openxr/EXTDebugUtils.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
/*
* Copyright LWJGL. All 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}.
*
* <h5>Enum values:</h5>
*
* <ul>
* <li>{@link #XR_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT}</li>
* <li>{@link #XR_TYPE_DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXT TYPE_DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXT}</li>
* <li>{@link #XR_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT}</li>
* <li>{@link #XR_TYPE_DEBUG_UTILS_LABEL_EXT TYPE_DEBUG_UTILS_LABEL_EXT}</li>
* </ul>
*/
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
*
* <h5>Enum values:</h5>
*
* <ul>
* <li>{@link #XR_DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT}</li>
* <li>{@link #XR_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT}</li>
* <li>{@link #XR_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT}</li>
* <li>{@link #XR_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT}</li>
* </ul>
*/
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
*
* <h5>Enum values:</h5>
*
* <ul>
* <li>{@link #XR_DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT}</li>
* <li>{@link #XR_DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT}</li>
* <li>{@link #XR_DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT}</li>
* <li>{@link #XR_DEBUG_UTILS_MESSAGE_TYPE_CONFORMANCE_BIT_EXT DEBUG_UTILS_MESSAGE_TYPE_CONFORMANCE_BIT_EXT}</li>
* </ul>
*/
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());
}

}
Loading

0 comments on commit b4a5445

Please sign in to comment.