-
Notifications
You must be signed in to change notification settings - Fork 0
/
bridge_api.c
127 lines (100 loc) · 2.98 KB
/
bridge_api.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <stdbool.h>
#include "bridge_api.h"
#include "LookingGlassCoreSDK/HoloPlayCore/include/HoloPlayCore.h"
#include "LookingGlassCoreSDK/HoloPlayCore/include/HoloPlayShaders.h"
char *InitializeApp(void) {
hpc_client_error error = hpc_InitializeApp("HoloPlayInfo.c", hpc_LICENSE_NONCOMMERCIAL);
if (error) {
return "Bridge Service not running";
}
return NULL;
}
void CloseApp(void) {
hpc_CloseApp();
}
char *GetHoloPlayCoreVersion(void) {
static char buf[1024];
hpc_GetHoloPlayCoreVersion(buf, 1000);
return buf;
}
char *GetHoloPlayServiceVersion(void) {
static char buf[1024];
hpc_GetHoloPlayServiceVersion(buf, 1000);
return buf;
}
int GetNumDevices(void) {
return hpc_GetNumDevices();
}
char *GetDeviceHDMIName(int device_index) {
static char buf[1024];
hpc_GetDeviceHDMIName(device_index, buf, 1000);
return buf;
}
char *GetDeviceType(int device_index) {
static char buf[1024];
hpc_GetDeviceType(device_index, buf, 1000);
return buf;
}
int GetDevicePropertyInt(int device_index, char *property_str) {
return hpc_GetDevicePropertyInt(device_index, property_str);
}
int GetDevicePropertyWinX(int device_index) {
return hpc_GetDevicePropertyWinX(device_index);
}
int GetDevicePropertyWinY(int device_index) {
return hpc_GetDevicePropertyWinY(device_index);
}
int GetDevicePropertyScreenW(int device_index) {
return hpc_GetDevicePropertyScreenW(device_index);
}
int GetDevicePropertyScreenH(int device_index) {
return hpc_GetDevicePropertyScreenH(device_index);
}
float GetDevicePropertyDisplayAspect(int device_index) {
return hpc_GetDevicePropertyDisplayAspect(device_index);
}
float GetDevicePropertyPitch(int device_index) {
return hpc_GetDevicePropertyPitch(device_index);
}
float GetDevicePropertyTilt(int device_index) {
return hpc_GetDevicePropertyTilt(device_index);
}
float GetDevicePropertyCenter(int device_index) {
return hpc_GetDevicePropertyCenter(device_index);
}
float GetDevicePropertySubp(int device_index) {
return hpc_GetDevicePropertySubp(device_index);
}
float GetDevicePropertyFringe(int device_index) {
return hpc_GetDevicePropertyFringe(device_index);
}
int GetDevicePropertyRi(int device_index) {
return hpc_GetDevicePropertyRi(device_index);
}
int GetDevicePropertyBi(int device_index) {
return hpc_GetDevicePropertyBi(device_index);
}
int GetDevicePropertyInvView(int device_index) {
return hpc_GetDevicePropertyInvView(device_index);
}
int GetDevicePropertyQuiltX(int device_index) {
return hpc_GetDevicePropertyQuiltX(device_index);
}
int GetDevicePropertyQuiltY(int device_index) {
return hpc_GetDevicePropertyQuiltY(device_index);
}
int GetDevicePropertyTileX(int device_index) {
return hpc_GetDevicePropertyTileX(device_index);
}
int GetDevicePropertyTileY(int device_index) {
return hpc_GetDevicePropertyTileY(device_index);
}
char *GetVertexShaderGLSL(void) {
return (char*)hpc_LightfieldVertShaderGLSL;
}
char *GetFragmentShaderGLSL(void) {
return (char*)hpc_LightfieldFragShaderGLSL;
}