mirror of https://github.com/bjornbytes/lovr.git
rm lovr.headset.getDisplayMask;
This commit is contained in:
parent
1eed2bc83c
commit
243e686ea4
|
@ -155,30 +155,6 @@ static int l_lovrHeadsetGetDisplayFrequency(lua_State* L) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
static int l_lovrHeadsetGetDisplayMask(lua_State* L) {
|
||||
uint32_t count;
|
||||
const float* points = lovrHeadsetDisplayDriver->getDisplayMask(&count);
|
||||
|
||||
if (!points) {
|
||||
lua_pushnil(L);
|
||||
return 1;
|
||||
}
|
||||
|
||||
lua_createtable(L, count, 0);
|
||||
for (uint32_t i = 0; i < count; i += 2) {
|
||||
lua_createtable(L, 2, 0);
|
||||
|
||||
lua_pushnumber(L, points[i + 0]);
|
||||
lua_rawseti(L, -2, 1);
|
||||
lua_pushnumber(L, points[i + 1]);
|
||||
lua_rawseti(L, -2, 2);
|
||||
|
||||
lua_rawseti(L, -2, i / 2 + 1);
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int l_lovrHeadsetGetViewCount(lua_State* L) {
|
||||
lua_pushinteger(L, lovrHeadsetDisplayDriver->getViewCount());
|
||||
return 1;
|
||||
|
@ -651,7 +627,6 @@ static const luaL_Reg lovrHeadset[] = {
|
|||
{ "getDisplayHeight", l_lovrHeadsetGetDisplayHeight },
|
||||
{ "getDisplayDimensions", l_lovrHeadsetGetDisplayDimensions },
|
||||
{ "getDisplayFrequency", l_lovrHeadsetGetDisplayFrequency },
|
||||
{ "getDisplayMask", l_lovrHeadsetGetDisplayMask },
|
||||
{ "getViewCount", l_lovrHeadsetGetViewCount },
|
||||
{ "getViewPose", l_lovrHeadsetGetViewPose },
|
||||
{ "getViewAngles", l_lovrHeadsetGetViewAngles },
|
||||
|
|
|
@ -115,7 +115,6 @@ typedef struct HeadsetInterface {
|
|||
HeadsetOrigin (*getOriginType)(void);
|
||||
void (*getDisplayDimensions)(uint32_t* width, uint32_t* height);
|
||||
float (*getDisplayFrequency)(void);
|
||||
const float* (*getDisplayMask)(uint32_t* count);
|
||||
double (*getDisplayTime)(void);
|
||||
double (*getDeltaTime)(void);
|
||||
uint32_t (*getViewCount)(void);
|
||||
|
|
|
@ -87,11 +87,6 @@ static void desktop_getDisplayDimensions(uint32_t* width, uint32_t* height) {
|
|||
*height = (uint32_t) h;
|
||||
}
|
||||
|
||||
static const float* desktop_getDisplayMask(uint32_t* count) {
|
||||
*count = 0;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static uint32_t desktop_getViewCount(void) {
|
||||
return 2;
|
||||
}
|
||||
|
@ -316,7 +311,6 @@ HeadsetInterface lovrHeadsetDesktopDriver = {
|
|||
.getDisplayTime = desktop_getDisplayTime,
|
||||
.getDeltaTime = desktop_getDeltaTime,
|
||||
.getDisplayDimensions = desktop_getDisplayDimensions,
|
||||
.getDisplayMask = desktop_getDisplayMask,
|
||||
.getViewCount = desktop_getViewCount,
|
||||
.getViewPose = desktop_getViewPose,
|
||||
.getViewAngles = desktop_getViewAngles,
|
||||
|
|
|
@ -1013,11 +1013,6 @@ static float openxr_getDisplayFrequency(void) {
|
|||
return frequency;
|
||||
}
|
||||
|
||||
static const float* openxr_getDisplayMask(uint32_t* count) {
|
||||
*count = 0;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static double openxr_getDisplayTime(void) {
|
||||
return state.frameState.predictedDisplayTime / 1e9;
|
||||
}
|
||||
|
@ -1799,7 +1794,6 @@ HeadsetInterface lovrHeadsetOpenXRDriver = {
|
|||
.getOriginType = openxr_getOriginType,
|
||||
.getDisplayDimensions = openxr_getDisplayDimensions,
|
||||
.getDisplayFrequency = openxr_getDisplayFrequency,
|
||||
.getDisplayMask = openxr_getDisplayMask,
|
||||
.getDisplayTime = openxr_getDisplayTime,
|
||||
.getDeltaTime = openxr_getDeltaTime,
|
||||
.getViewCount = openxr_getViewCount,
|
||||
|
|
|
@ -8,7 +8,6 @@ extern HeadsetOrigin webxr_getOriginType(void);
|
|||
extern double webxr_getDisplayTime(void);
|
||||
extern double webxr_getDeltaTime(void);
|
||||
extern void webxr_getDisplayDimensions(uint32_t* width, uint32_t* height);
|
||||
extern const float* webxr_getDisplayMask(uint32_t* count);
|
||||
extern uint32_t webxr_getViewCount(void);
|
||||
extern bool webxr_getViewPose(uint32_t view, float* position, float* orientation);
|
||||
extern bool webxr_getViewAngles(uint32_t view, float* left, float* right, float* up, float* down);
|
||||
|
@ -78,7 +77,6 @@ HeadsetInterface lovrHeadsetWebXRDriver = {
|
|||
.getOriginType = webxr_getOriginType,
|
||||
.getDisplayTime = webxr_getDisplayTime,
|
||||
.getDisplayDimensions = webxr_getDisplayDimensions,
|
||||
.getDisplayMask = webxr_getDisplayMask,
|
||||
.getViewCount = webxr_getViewCount,
|
||||
.getViewPose = webxr_getViewPose,
|
||||
.getViewAngles = webxr_getViewAngles,
|
||||
|
|
|
@ -199,10 +199,6 @@ var webxr = {
|
|||
return 0.0;
|
||||
},
|
||||
|
||||
webxr_getDisplayMask: function() {
|
||||
return 0; /* NULL */
|
||||
},
|
||||
|
||||
webxr_getViewCount: function() {
|
||||
return state.viewer ? state.viewer.views.length : 0;
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue