forked from LWJGL/lwjgl3
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(generator): struct-by-value parameters. Close LWJGL#496
- Loading branch information
Showing
6 changed files
with
125 additions
and
3 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
modules/lwjgl/openvr/src/generated/c/org_lwjgl_openvr_VRChaperone.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Copyright LWJGL. All rights reserved. | ||
* License terms: https://www.lwjgl.org/license | ||
* MACHINE GENERATED FILE, DO NOT EDIT | ||
*/ | ||
#include "common_tools.h" | ||
|
||
#ifdef LWJGL_WINDOWS | ||
#define APIENTRY __stdcall | ||
#else | ||
#define APIENTRY | ||
#endif | ||
|
||
typedef struct HmdColor_t | ||
{ | ||
float r; | ||
float g; | ||
float b; | ||
float a; | ||
} HmdColor_t; | ||
|
||
typedef void (APIENTRY *VRChaperone_SetSceneColorPROC) (HmdColor_t); | ||
|
||
EXTERN_C_ENTER | ||
|
||
JNIEXPORT void JNICALL Java_org_lwjgl_openvr_VRChaperone_nVRChaperone_1SetSceneColor(JNIEnv *__env, jclass clazz, jlong colorAddress, jlong __functionAddress) { | ||
VRChaperone_SetSceneColorPROC VRChaperone_SetSceneColor = (VRChaperone_SetSceneColorPROC)(intptr_t)__functionAddress; | ||
HmdColor_t *color = (HmdColor_t *)(intptr_t)colorAddress; | ||
UNUSED_PARAMS(__env, clazz) | ||
VRChaperone_SetSceneColor(*color); | ||
} | ||
|
||
EXTERN_C_EXIT |
45 changes: 45 additions & 0 deletions
45
modules/lwjgl/openvr/src/generated/c/org_lwjgl_openvr_VROverlay.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
* Copyright LWJGL. All rights reserved. | ||
* License terms: https://www.lwjgl.org/license | ||
* MACHINE GENERATED FILE, DO NOT EDIT | ||
*/ | ||
#include "common_tools.h" | ||
|
||
#ifdef LWJGL_WINDOWS | ||
#define APIENTRY __stdcall | ||
#else | ||
#define APIENTRY | ||
#endif | ||
|
||
typedef struct HmdVector2_t | ||
{ | ||
float v[2]; | ||
} HmdVector2_t; | ||
|
||
typedef struct HmdRect2_t | ||
{ | ||
struct HmdVector2_t vTopLeft; | ||
struct HmdVector2_t vBottomRight; | ||
} HmdRect2_t; | ||
|
||
typedef jint (APIENTRY *VROverlay_GetTransformForOverlayCoordinatesPROC) (jlong, jint, HmdVector2_t, intptr_t); | ||
typedef void (APIENTRY *VROverlay_SetKeyboardPositionForOverlayPROC) (jlong, HmdRect2_t); | ||
|
||
EXTERN_C_ENTER | ||
|
||
JNIEXPORT jint JNICALL Java_org_lwjgl_openvr_VROverlay_nVROverlay_1GetTransformForOverlayCoordinates(JNIEnv *__env, jclass clazz, jlong ulOverlayHandle, jint eTrackingOrigin, jlong coordinatesInOverlayAddress, jlong pmatTransformAddress, jlong __functionAddress) { | ||
VROverlay_GetTransformForOverlayCoordinatesPROC VROverlay_GetTransformForOverlayCoordinates = (VROverlay_GetTransformForOverlayCoordinatesPROC)(intptr_t)__functionAddress; | ||
HmdVector2_t *coordinatesInOverlay = (HmdVector2_t *)(intptr_t)coordinatesInOverlayAddress; | ||
intptr_t pmatTransform = (intptr_t)pmatTransformAddress; | ||
UNUSED_PARAMS(__env, clazz) | ||
return (jint)VROverlay_GetTransformForOverlayCoordinates(ulOverlayHandle, eTrackingOrigin, *coordinatesInOverlay, pmatTransform); | ||
} | ||
|
||
JNIEXPORT void JNICALL Java_org_lwjgl_openvr_VROverlay_nVROverlay_1SetKeyboardPositionForOverlay(JNIEnv *__env, jclass clazz, jlong ulOverlayHandle, jlong avoidRectAddress, jlong __functionAddress) { | ||
VROverlay_SetKeyboardPositionForOverlayPROC VROverlay_SetKeyboardPositionForOverlay = (VROverlay_SetKeyboardPositionForOverlayPROC)(intptr_t)__functionAddress; | ||
HmdRect2_t *avoidRect = (HmdRect2_t *)(intptr_t)avoidRectAddress; | ||
UNUSED_PARAMS(__env, clazz) | ||
VROverlay_SetKeyboardPositionForOverlay(ulOverlayHandle, *avoidRect); | ||
} | ||
|
||
EXTERN_C_EXIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters