-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathohmdhandler.h
52 lines (37 loc) · 951 Bytes
/
ohmdhandler.h
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
#ifndef OHMDHANDLER_H
#define OHMDHANDLER_H
#include <atomic>
#include <QThread>
#include <QMatrix4x4>
struct ohmd_context;
struct ohmd_device;
class OhmdHandler : public QObject
{
Q_OBJECT
public:
OhmdHandler(QObject *parent);
~OhmdHandler();
bool init();
std::atomic_bool isRunning;
QMatrix4x4 rightProjection;
QMatrix4x4 leftProjection;
QMatrix4x4 modelView[2];
QMatrix4x4 projection[2];
void update();
const char *distortionFragShader = nullptr;
const char *distortionVertShader = nullptr;
QSize displaySize;
//viewport is half the screen
float viewport_scale[2]{};
float aberr_scale[3];
float warp_scale = 1.f;
float warp_adj = 1.0f;
float distortion_coeffs[4];
float left_lens_center[2]{};
float right_lens_center[2]{};
float horiz_sep = 0.;
private:
ohmd_context *m_ohmdContext;
ohmd_device *m_ohmdDevice;
};
#endif // OHMDHANDLER_H